Presets

Canned styles for your interface elements.

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.

1
2
3
  1. Filled - a filled preset of the primary brand color.
  2. Tonal - a tonal preset of the primary brand color.
  3. 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.

txt
preset-filled-{color}-{lightModeShade}-{darkModeShade}

Tonal

Ideal for alerts and axillary buttons and actions.

txt
preset-tonal-{color}

Outlined

Ideal when for minimal interfaces, such as a surrounding card.

txt
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.

1
2
3
4
  1. Glass - a custom preset using background transparency and backdrop blur.
  2. Elevated - mixes a filled preset with a shadow.
  3. Ghost - has no style by default, but shows a tonal preset on hover.
  4. 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.

Card
Card
Card

Glass Presets

Fine tune your Presets with special effects, such as the Tailwind Backdrop Blur for a glass-like effect.

Neutral
Primary
Secondary
Tertiary
Success
Warning
Error
Surface

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 class attribute.
View page on GitHub