Presets are pre-defined styles that allow you to quickly and easily style buttons, badges, cards, and more. Create by mixing Skeleton and Tailwind primitives.
- Filled - a filled preset of the primary brand color.
- Tonal - a tonal preset of the primary brand color.
- Outlined - an outlined preset of the primary brand color.
- Elevated - mixes a filled preset with a shadow.
- Ghost - has no style by default, but shows a tonal preset on hover.
- Ghost Icon - has no style by default, but shows a branded tonal preset on hover.
- Gradient - a custom preset generated using Tailwind gradient primitives.
Enabling Presets
Skeleton provides an optional set of presets for filled, tonal, and outlined styles. To enable these, simply add the following import to your global stylesheet. This is recommended for new users to Skeleton.
@import '@skeletonlabs/skeleton/optional/presets';Skeleton Presets
Skeleton’s provides the following opinionated set of styles, including accessible backgrounds and text colors.
Filled
preset-filled-{color}-{lightModeShade}-{darkModeShade}Tonal
preset-tonal-{color}Outlined
preset-outlined-{color}-{shade}-{shade}Custom Presets
For advanced users, we recommend disabing the Skeleton presets in favor of custom-generated presets. This ensures you retain full control over the look and feel of each element. Consider these best practices when creating presets.
- Custom presets are only limited by your imagination.
- Use any combination of Skeleton or Tailwind-provided primitive to generate a preset.
- Apply presets to any relevant element, including: buttons, cards, inputs, and more.
- Use a set naming convention, such as
preset-{foo}to keep things standardized. - Implement all presets in using Tailwind’s @utility directive in your global stylesheet.
- Abstrast presets to a stylesheet or NPM package for shared used between projects.
Gradient Presets
Tailwind provides a number of powerful Gradient utility classes that can be used to generate presets.
Glass Presets
TODO: examples coming soon!