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 on how to create your own.
- 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.
Skeleton Presets
The following Presets are available to you when using Skeleton. Each comes with a shorthand neutral option.
Filled
Has a wide variety of use cases and automatically implements contrast colors automatically.
preset-filled-{color}-{lightModeShade}-{darkModeShade}Tonal
Ideal for alerts and axillary buttons and actions.
preset-tonal-{color}Outlined
Ideal when for minimal interfaces, such as a surrounding card.
preset-outlined-{color}-{shade}-{shade}User Generated
In a nutshell, Presets are just a combination of reused 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. See reference examples below. All custom presets should be implemented in your application global stylesheet.
- 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.
Examples
To help illustrate the concept, a few practicl examples of user generated Presets have been provided below.
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
- You’re only limited by your imagination when creating custom Presets.
- Use any combination of Skeleton or Tailwind-provided primitive 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.