Usage
Note
Installation
Twilight Themes
Bundler/ES modules
NPM Installation Command
Yarn Installation Command
npm install @salla.sa/twilight-components --save
Import Command
HTML/CDN
The following code imports and applies polyfills for older browsers, then registers the Twilight Web Components with the
window
object, enabling their use in the webpage.
Tailwind Config
tailwind.config.js
file:
content
option in your tailwind.config.js
file with all of your template paths, otherwise your CSS will be empty
Note
tailwind.config.js
is already bundled with the Twilight starter theme files. However, you may use any other CSS framework.Usage
Note
CSS Variables
Information
Events
whenDefined
function, which takes a component name and returns a promise. When the component is defined, the promise will be fulfilled: