Colors

Getting started

Colors

The color is its own class, as in btn primary. The same word works on every control. Indigo, pink, teal, gray, green, red, amber, and sky are the defaults. Set --color-secondary, or any of the eight, to replace one.

ClassDefault solidDefault on
primaryIndigoButton, icon button, badge, checkbox, radio, switch, slider
secondaryPinkOnly when you add the class
tertiaryTealOnly when you add the class
neutralGrayInput, textarea, and select
successGreenOnly when you add the class
errorRedMessage
warningAmberAlert
infoSkyOnly when you add the class

A card with no color stays white. A dialog panel with no color stays neutral, and so does its close button.

A color on a parent

The color class sets a variable, and variables inherit. A message inside a primary card follows that card. Put the color on the message itself when it must stay red.

<section class="card primary">
  <p class="message error">Required</p>
</section>