Color
Mirror’s color system is tokenized and includes an app.color token layer with semantic color tokens. These tokens are exposed through custom Tailwind CSS utility classes.
For a detailed explanation of Mirror’s color system, please refer to the principles.
Surface Colors
Surface Colors are intended for static elements as well as prose text. Included are utility classes for background, text and border colors.
Background
Background colors are available for four different levels of elevation. They are intended to be stacked on top of each other.
TIP
It is sometimes useful to start from the base elevation again, if an element is visually seperated by a shadow, border or backdrop, i.e. a drawer or modal.
Text
Mirror includes three different text colors for static elements and prose text. In addition there is a link color, with hover and active states intended for hyperlinks.
text-surface: Intended for headlines as well as flowing text. Used in most cases.text-surface-muted: Intended for secondary and supporting text such as subtitles, footnotes or callouts.text-surface-subtle: Intended for tertiary text or as a more subtle alternative for secondary and supporting text.text-surface-link,text-surface-link-hover,text-surface-link-active: Intended for hyperlinks.
Border
Mirror’s surface border color is intended to be used for all static elements. It can be combined with any surface background color.
For compatability with Tailwind CSS’s divide classes , Mirror includes divide-surface.
Component Colors
Component Colors are intended for all interactive components. They also power Mirror’s built in components such as button, input, checkbox, etc.
Background
Each variant includes utilitiy classes for solid, tone and translucent backgrounds. Mirror comes with hover and active classes for each.
Text
Each background comes with a matching utility class for colored text.
Additionally there are utility classes for solid, muted and subtle colored text. Utility classes for solid hover and active states are also available.
Border
Each variant includes utility classes for solid and translucent borders. Utility classes for translucent hover and active states are also available.
Focus
For focus styling use focus-visible:focus-ring.
TIP
This utility class adds a 2px border to the element. Make sure to include a border in its unfocused state as well. This border can also be transparent.