Design system

Colour tokens, typography and components.

Colors

Use these colours instead of raw Tailwind colours like orange-600. They are named by what they're for, and they switch automatically in dark mode.

Use each token with the prefix it's listed under. Surface is a background colour, so bg-surface works but text-surface does nothing. Icon and utility tokens are the exception and work with any prefix.

Danger, warning, success and info work the same way. For a message box, use the subtle background with default or strong text. For a solid badge, use the strong background with the -on text colour.

Background

Canvas is the page background. Surface is for cards and panels. Raised is for menus and popovers that float above the page, sunken for areas set into it. Overlay dims the page behind a dialog. Inverse is the opposite of the page (dark in light mode, light in dark mode), for tooltips. The two state colours tint a row or item on hover and press.

.bg-canvas

.bg-surface

.bg-surface-raised

.bg-surface-sunken

.bg-overlay

.bg-inverse

.bg-state-hover

.bg-state-pressed

Text

Default is for body text, strong for headings, subtle for hints and captions. Disabled is for controls that can't be used. Inverse is for text on the inverse background. The link colours cover a link's normal, hover and visited states.

Aa

.text-subtle

Aa

.text-default

Aa

.text-strong

Aa

.text-disabled

Aa

.text-inverse

Aa

.text-link-default

Aa

.text-link-hover

Aa

.text-link-visited

Icon

Icons take their colour from text-icon-* classes. Use default next to body text, subtle for decorative icons and strong for icons that stand alone.

.text-icon-subtle

.text-icon-default

.text-icon-strong

.text-icon-disabled

.text-icon-inverse

Border

Subtle is for dividers, default for cards and inputs, strong for edges that need to stand out. Focus outlines the element that has keyboard focus. Selected outlines the chosen option in a group.

.border-subtle

.border-default

.border-strong

.border-focus

.border-selected

Brand

Brand colours for accents, not for buttons (use Action for those). Primary is this repo's black (near-white in dark mode), secondary is near-black (near-white in dark mode) and tertiary is a soft orange tint for highlighted areas.

.bg-primary

Aa

.text-primary

.border-primary

.bg-secondary

Aa

.text-secondary

.border-secondary

.bg-tertiary

Aa

.text-tertiary

.border-tertiary

Danger

Errors and failed actions.

.bg-danger-subtle

.bg-danger-strong

Aa

.text-danger-subtle

Aa

.text-danger-default

Aa

.text-danger-strong

Aa

.text-danger-on

.text-danger-icon-subtle

.text-danger-icon-default

.text-danger-icon-strong

.border-danger-subtle

.border-danger-default

.border-danger-strong

Warning

Things that need attention but don't stop the user.

.bg-warning-subtle

.bg-warning-strong

Aa

.text-warning-subtle

Aa

.text-warning-default

Aa

.text-warning-strong

Aa

.text-warning-on

.text-warning-icon-subtle

.text-warning-icon-default

.text-warning-icon-strong

.border-warning-subtle

.border-warning-default

.border-warning-strong

Success

Confirms that something worked.

.bg-success-subtle

.bg-success-strong

Aa

.text-success-subtle

Aa

.text-success-default

Aa

.text-success-strong

Aa

.text-success-on

.text-success-icon-subtle

.text-success-icon-default

.text-success-icon-strong

.border-success-subtle

.border-success-default

.border-success-strong

Info

Neutral notes and tips.

.bg-info-subtle

.bg-info-strong

Aa

.text-info-subtle

Aa

.text-info-default

Aa

.text-info-strong

Aa

.text-info-on

.text-info-icon-subtle

.text-info-icon-default

.text-info-icon-strong

.border-info-subtle

.border-info-default

.border-info-strong

Action - WIP — review based on usage later on

Button colours, with hover, pressed and disabled states for each kind of button. Use primary for the main action on a page, secondary for other actions, ghost for minor ones and danger for actions that delete or can't be undone. Put a button's text in the matching text colour, e.g. text-action-primary on bg-action-primary.

.bg-action-primary

.bg-action-primary-hover

.bg-action-primary-pressed

.bg-action-primary-disabled

Aa

.text-action-primary

Aa

.text-action-primary-disabled

.bg-action-secondary

.bg-action-secondary-hover

.bg-action-secondary-pressed

.bg-action-secondary-disabled

Aa

.text-action-secondary

Aa

.text-action-secondary-disabled

.bg-action-ghost

.bg-action-ghost-hover

.bg-action-ghost-pressed

Aa

.text-action-ghost

Aa

.text-action-ghost-disabled

.bg-action-danger

.bg-action-danger-hover

.bg-action-danger-pressed

.bg-action-danger-disabled

Aa

.text-action-danger

Aa

.text-action-danger-disabled

Utility

Colours for focus rings, selected text, loading placeholders and scrollbars. They work with any prefix, so ring-utility-focus-ring is valid.

.bg-utility-focus-ring

.bg-utility-selection

.bg-utility-skeleton-base

.bg-utility-skeleton-shimmer

.bg-utility-scrollbar-thumb