Component Guidelines

Components UI Library

A living reference for every component and token in the UI Library. New to FORMA? Start with Colors or Typography — then use the sidebar or press ? for keyboard shortcuts.

0
Components
0
Variants
0
CSS Classes
components.css → .subtitle token-bound

Subtitle

Section label with an inline rule.
Used as a sub-heading inside cards and panels.

.subtitle > .subtitle__label + .subtitle__rule
Components
Colour Palette
components.css → .section-header token-bound

Header

Full-width H1 heading with a bottom rule.
Mirrors the top header of each Figma frame.
Supports an --inverse modifier for dark surfaces.

.section-header (default)

Typography

.section-header.section-header--inverse

Colour Palette

components.css → .post-it token-bound

Post-it

Sticky-note annotation block. Use for inline callouts, design notes, or tooltips.

.post-it
This color passes AA contrast
.post-it
Heading font: Bebas Neue at 64 / 72
.post-it
Base spacing unit: 4px
Base

Card

Base surface container with hover elevation. Modifier: --elevated (raised surface + shadow).

.forma-card .forma-card--elevated
.forma-card
Default

Base surface. padding: gap-xl · gap: gap-xl · radius-16.

.forma-card--elevated
Elevated

Raised surface color + shadow-md.

components.css → .badge token-bound

Badge

Seven semantic colour variants for status, category, and intent labels.

Neutral Info Success Warning Alert Error Tip

In context — status tags on a list
Design tokens PR Merged
Component audit In progress
Accessibility pass Blocked
Dark mode Planned
components.css → .btn token-bound

Button

Four intent variants (primary, secondary, ghost, danger) in three sizes.
All states — hover, focus, active, and disabled — are token-bound.

Variants
.btn.btn--primary
.btn.btn--secondary
.btn.btn--ghost
.btn.btn--danger
Sizes
.btn--sm
.btn (default)
.btn--lg
Disabled state
All states — Primary
Default
Hover
Focus
Active
Disabled
All states — Ghost
Default
Hover
Focus
Active
Disabled
components.css → .input token-bound

Input

Text field component. Five states: default, hover, focus, error, and disabled.
Focus ring uses --color-borders-focus with a 3px blue-100 halo.

All states
Default
Hover
Focus
Error
Disabled
In context — form group
Must follow semver format (e.g. v1.0.0)
components.css → .alert token-bound

Alert

Contextual message block in four semantic variants: info, success, warning, and error.

.alert.alert--info

Information

This is an informational message for the user.

.alert.alert--success

Success

Your action was completed successfully.

.alert.alert--warning

Warning

Please review this information before proceeding.

.alert.alert--error

Error

Something went wrong. Please try again.

components.css → .tooltip token-bound

Tooltip

Contextual label with optional directional arrow. Two variants: light and dark. Nine arrow positions.

light · none
Tooltip text here
light · top-left
Tooltip text here
light · top-center
Tooltip text here
light · top-right
Tooltip text here
light · bottom-left
Tooltip text here
light · bottom-center
Tooltip text here
light · bottom-right
Tooltip text here
light · left
Tooltip text here
light · right
Tooltip text here
dark · none
Tooltip text here
dark · top-left
Tooltip text here
dark · top-center
Tooltip text here
dark · top-right
Tooltip text here
dark · bottom-left
Tooltip text here
dark · bottom-center
Tooltip text here
dark · bottom-right
Tooltip text here
dark · left
Tooltip text here
dark · right
Tooltip text here