Presets are pre-defined utility classes that allow you to quickly and easily style buttons, badges, cards, and more. They are implemented using a combination of Skeleton and Tailwind primitives. A number of presets are available out of the box, with guidelines provided for crafting your own.
Skeleton Presets
The following Presets are available to you when using Skeleton. Each comes with a shorthand neutral option.
- 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.
Filled
Has a wide variety of use cases and automatically implements contrast colors automatically.
preset-filled
preset-filled-{color}-{lightModeShade}-{darkModeShade}Tonal
Ideal for alerts and axillary buttons and actions.
preset-tonal
preset-tonal-{color}Outlined
Ideal when for minimal interfaces, such as a surrounding card.
preset-outlined
preset-outlined-{color}-{shade}-{shade}User Generated
In a nutshell, Presets are a resuable combination of styles that mix Skeleton and Tailwind primitives. This means you can create as many combinations as you wish to help control the aesthetic of your application. All custom presets should be implemented in your application’s global stylesheet. See our reference examples below.
- Glass - a custom preset using background transparency and backdrop blur.
- Elevated - mixes a filled preset with a shadow.
- Ghost - has no style by default, but shows a tonal preset on hover.
- Gradient - a custom preset generated using Tailwind gradient primitives.
Pratical Examples
Input Presets
Use Presets to generate your own custom validation classes for inputs.
Gradient Presets
Utilize Tailwind Gradient utility classes to create fancy buttons or cards.
Glass Presets
Fine tune your Presets with special effects, such as the Tailwind Backdrop Blur for a glass-like effect.
Guidelines
- When creating custom Presets, you’re only limited by your imagination.
- Use any combination of Skeleton or Tailwind primitives to generate a Preset.
- Apply Presets to any relevant element, including: buttons, badges, chips, cards, inputs, and more.
- Use a set naming convention, such as
preset-{foo}-{bar}to keep things standardized. - Consider implementing Presets using Tailwind’s @utility directive in your stylesheet.
- Abstrast Presets to a stylesheet or NPM package for shared used between projects.
- Use Presets to apply styling for your components via the
classattribute.