halfmoonui / halfmoon
- пятница, 14 августа 2020 г. в 00:24:13
CSS
Front-end framework with a built-in dark mode, designed for rapidly building beautiful dashboards and product pages.
Front-end framework with a built-in dark mode, designed for rapidly building beautiful dashboards and product pages.
halfmoon-variables.css
) where custom CSS properties (variables) are used in the code for things like colors, layout properties, etc. This makes it extremely easy to customize Halfmoon to your liking, as the use of modern CSS variables means that things like pre-processors are not needed.To learn more, go to the documentation.
The quickest way to get started with Halfmoon is by using the CDN to include the following files:
<!-- Halfmoon CSS -->
<link href="https://cdn.jsdelivr.net/gh/halfmoonui/halfmoon@1.0.3/css/halfmoon.min.css" rel="stylesheet" />
<!-- Halfmoon JS -->
<script src="https://cdn.jsdelivr.net/gh/halfmoonui/halfmoon@1.0.3/js/halfmoon.min.js"></script>
npm install halfmoon
After installation, the required CSS and JS file can be imported in the following way:
// Include CSS file
require("halfmoon/css/halfmoon.min.css");
// Import JS library
var halfmoon = require("halfmoon");
Please note that manual initialization is required for some components, that is, after the DOM is loaded, the following method needs to be called:
// Call this method after the DOM has been loaded
halfmoon.onDOMContentLoaded();
This initializes all of the components that require JavaScript, such as dropdowns, custom file inputs, shortcuts, etc.
In this way, Halfmoon can be used with frameworks that use the virtual DOM, such as React and Vue. For instance, in the case of Vue, the halfmoon.onDOMContentLoaded()
method would be called inside the mounted()
hook of your component.
You can use the starter template generator to generate boilerplates for your project. The generator takes your settings and adds the appropriate classes and defines the required containers and elements.
Once again, we recommend reading the documentation, as it contains a lot of examples to help you quickly build websites.
Copyright 2020, Halfmoon UI