Themes are the heart of the Skeleton’s design system, empowered by CSS custom properties, authored as CSS-in-JS to enable simple integration into Skeleton’s Tailwind plugin. Which allows for simple pre-registration and switching on demand.
Preset Themes
Skeleton comes with a selection of high quality preset themes out of the box.
cerberus
catppuccin
pine
rose
Add the following import to the top of your tailwind.config
, then continue to the register instructions below.
Custom Themes
Optionally you can choose to generate a custom theme to adapt to your app’s unique design aesthetic. Skeleton provides a powerful but easy to use theme generator to make to enable this.
- Open the Theme Generator and design your theme.
- Tap the “code” view from the menu options at the top of the site.
- Provide a unique name for your theme.
- Copy the contents of the generated theme in full.
- Create a new file in the root of your project called
theme-custom.ts
(any name is fine).
You may import each custom theme at the top of your project’s tailwind.config
. Then proceed to the register instructions below.
Register Themes
Register each imported theme within the Skeleton plugin settings in tailwind.config
. Then proceed to activation below.
TIP: There’s no limited to how many themes you can register, but each increases the size of your generated CSS bundle.
Activate a Theme
Finally, set the active theme to display using the data-theme
attribute on your <body>
element.
Customizing Presets
You may update the CSS Custom Properties provided by Skeleton’s preset themes. Use the following syntax and apply these styles changes to your project’s global stylesheet. This will target the root scope, a specific theme, then set the property value.
Custom Fonts
COMING SOON
API Reference
For more information, please refer to the full Tailwind Plugin documentation.