elements
Demos UI Feed Discuss Install
Style System
  • Style
  • Themes
  • Behaviors
Forms
  • Button
  • ButtonGroup
  • Checkbox
  • ColorPicker
  • Combobox
  • Field
  • FileUpload
  • Input
  • InputGroup
  • InputOTP
  • Label
  • NativeSelect
  • NumberInput
  • PasswordInput
  • RadioGroup
  • Select
  • Slider
  • Switch
  • TagsInput
  • Textarea
  • Toggle
  • ToggleGroup
Overlays
  • AlertDialog
  • Command
  • ContextMenu
  • Dialog
  • Drawer
  • DropdownMenu
  • HoverCard
  • Menubar
  • NavigationMenu
  • Popover
  • Sheet
  • Toast
  • Tooltip
Display
  • Accordion
  • Alert
  • AspectRatio
  • Avatar
  • Badge
  • Breadcrumb
  • Card
  • Collapsible
  • Empty
  • Item
  • Kbd
  • Pagination
  • Progress
  • Separator
  • Skeleton
  • Spinner
  • Table
  • Tabs
  • Tree
Layout
  • Carousel
  • Resizable
  • ScrollArea
  • Sidebar
Dates
  • Calendar
  • DatePicker
  • DateRangePicker
  • TimePicker
Data
  • AreaChart
  • BarChart
  • Chart
  • DataTable
  • Kanban
  • LineChart
  • PieChart
  • RadarChart
  • RadialChart
  • VirtualList
Chat
  • Attachment
  • Message
  • MessageList
  • PromptInput
Elements UI / Style

Style

Every token and base class in the stylesheet the templates share, drawn with the real classes and the values the browser computes. Pick a look and a mode in the toolbar and every swatch and value here follows. The names are the ones you and your agent write in app CSS.

  • Color
  • Type
  • Spacing
  • Radius and shadow
  • Layout primitives
  • Buttons
  • Forms
  • Pills and badges
  • Callouts
  • Cards
  • Tabs
  • Tables
  • Utilities

Color

App CSS reads the semantic tokens: --ink, --bg, --rule, --accent and the status triples. They follow the theme and flip for dark mode on their own. The ramps exist for the semantic tokens to point at; reach past them to a numbered step and that color stops following the theme. A new app starts monochrome, with --accent at --neutral-900; pick a look in the toolbar and the accent swatches show that theme's accent.

Palette

neutral
  1. 50
  2. 100
  3. 200
  4. 300
  5. 400
  6. 500
  7. 600
  8. 700
  9. 800
  10. 900
  11. 950
success
  1. 50
  2. 100
  3. 200
  4. 300
  5. 400
  6. 500
  7. 600
  8. 700
  9. 800
  10. 900
  11. 950
warning
  1. 50
  2. 100
  3. 200
  4. 300
  5. 400
  6. 500
  7. 600
  8. 700
  9. 800
  10. 900
  11. 950
danger
  1. 50
  2. 100
  3. 200
  4. 300
  5. 400
  6. 500
  7. 600
  8. 700
  9. 800
  10. 900
  11. 950
info
  1. 50
  2. 100
  3. 200
  4. 300
  5. 400
  6. 500
  7. 600
  8. 700
  9. 800
  10. 900
  11. 950

Semantic tokens

white, black
  • --white
  • --black
bg
  • --bg
  • --bg-soft
  • --bg-muted
  • --bg-panel
  • --bg-elevated
  • --bg-canvas
  • --bg-inverse
ink
  • --ink
  • --ink-soft
  • --ink-dim
  • --ink-faint
  • --ink-inverse
  • --ink-soft-flow
rule
  • --rule
  • --rule-soft
  • --rule-strong
accent
  • --accent
  • --accent-deep
  • --accent-soft
  • --accent-ink
  • --accent-edge
success
  • --success
  • --success-fill
  • --success-soft
  • --success-ink
  • --success-edge
warning
  • --warning
  • --warning-soft
  • --warning-ink
  • --warning-edge
danger
  • --danger
  • --danger-fill
  • --danger-soft
  • --danger-ink
  • --danger-edge
info
  • --info
  • --info-fill
  • --info-soft
  • --info-ink
  • --info-edge
focus
  • --focus
input
  • --input-bg
  • --input-border
  • --input-border-hover
  • --input-border-focus
  • --input-placeholder
terminal
  • --terminal-bg
  • --terminal-ink
  • --terminal-dim

Type

Bare headings and paragraphs take the scale with no classes: h1 is --text-4xl, body text is --text-base on --leading-body. One sans carries titles, body and controls, and the mono carries code; a theme can change any of them. .display, .lede and .eyebrow cover the three roles a heading alone does not.

Scale

  1. --text-2xs The quick brown fox jumps over the lazy dog
  2. --text-xs The quick brown fox jumps over the lazy dog
  3. --text-sm The quick brown fox jumps over the lazy dog
  4. --text-base The quick brown fox jumps over the lazy dog
  5. --text-md The quick brown fox jumps over the lazy dog
  6. --text-lg The quick brown fox jumps over the lazy dog
  7. --text-xl The quick brown fox jumps over the lazy dog
  8. --text-2xl The quick brown fox jumps over the lazy dog
  9. --text-3xl Elements renders the page finished
  10. --text-4xl Elements UI
  11. --text-5xl Elements UI
  12. --text-6xl Elements UI
  13. --text-7xl Elements UI
  14. --text-8xl Elements UI

Families

  1. --font-sans The quick brown fox jumps over the lazy dog 0123456789
  2. --font-serif The quick brown fox jumps over the lazy dog 0123456789
  3. --font-mono The quick brown fox jumps over the lazy dog 0123456789

Weights

  • Aa --weight-thin
  • Aa --weight-light
  • Aa --weight-regular
  • Aa --weight-medium
  • Aa --weight-semibold
  • Aa --weight-bold
  • Aa --weight-black

Leading and tracking

  • --leading-none
  • --leading-tight
  • --leading-snug
  • --leading-body
  • --leading-relaxed
  • --leading-loose
  • --tracking-tighter
  • --tracking-tight
  • --tracking-snug
  • --tracking-normal
  • --tracking-wide
  • --tracking-wider
  • --tracking-widest

Spacing

A 4px scale. Layout containers own spacing and components never set outer margins, so the space between two things comes from a .stack or .cluster gap, never from a margin on the thing itself.

  1. --space-0
  2. --space-px
  3. --space-0-5
  4. --space-1
  5. --space-1-5
  6. --space-2
  7. --space-2-5
  8. --space-3
  9. --space-3-5
  10. --space-4
  11. --space-5
  12. --space-6
  13. --space-7
  14. --space-8
  15. --space-9
  16. --space-10
  17. --space-11
  18. --space-12
  19. --space-14
  20. --space-16
  21. --space-20
  22. --space-24
  23. --space-28
  24. --space-32
  25. --space-40
  26. --space-48
  27. --space-56
  28. --space-64

Radius and shadow

A 4px radius by default. The semantic slots say which radius a kind of surface takes: --radius-control for buttons and inputs, --radius-surface for cards, --radius-overlay for popovers, --radius-dialog for modals, --radius-tag and --radius-pill for the small things, so a theme can square the controls and round the dialogs. Shadows are quiet, and every focusable control draws the same --focus-ring.

Radius scale

  • --radius-none
  • --radius-xs
  • --radius-sm
  • --radius-md
  • --radius-lg
  • --radius-xl
  • --radius-2xl
  • --radius-3xl
  • --radius-4xl
  • --radius-full

Where each radius goes

  • --radius
  • --radius-control
  • --radius-surface
  • --radius-overlay
  • --radius-dialog
  • --radius-tag
  • --radius-pill

Shadows

  • --shadow-xs
  • --shadow-sm
  • --shadow-md
  • --shadow-lg
  • --shadow-xl
  • --shadow-2xl
  • --shadow-inner
  • --focus-ring
  • --focus-ring-danger

Layout primitives

.page-shell is the page frame, a class you write and never a default. Pick its width by the number: is-form for most app pages, is-prose for running text, is-wide for tables. .stack, .row and .cluster lay their children out with gap and clear their margins, so a card works the same inside any of them.

Page shell widths, drawn at half size

  1. is-narrow --container-sm A sidebar or one narrow card. Not a page.
  2. is-form --container-2xl A form, a list, a settings page. The usual choice for an app page.
  3. is-prose --container-prose Running text.
  4. is-marketing --container-5xl A landing page.
  5. (default) --container-shell A general app page.
  6. is-wide --container-wide Tables and dashboards.

Stack, row, cluster

one two three
.stack flows down with a --space-4 gap. is-xs to is-2xl change it.
one two three
.row flows across, centered, and never wraps. is-baseline, is-start, is-end and is-stretch align it.
alpha beta gamma delta epsilon zeta eta
.cluster flows across and wraps, for tags, buttons and metadata.

Containers

  • --container-xs
  • --container-sm
  • --container-md
  • --container-lg
  • --container-xl
  • --container-2xl
  • --container-3xl
  • --container-4xl
  • --container-5xl
  • --container-6xl
  • --container-7xl
  • --container-prose
  • --container-shell
  • --container-wide
  • --container-padding
  • --measure

Breakpoints and layering

  • --bp-sm
  • --bp-md
  • --bp-lg
  • --bp-xl
  • --bp-2xl
  • --z-base
  • --z-raised
  • --z-sticky
  • --z-fixed
  • --z-overlay
  • --z-modal
  • --z-popover
  • --z-dropdown
  • --z-tooltip
  • --z-toast
  • --z-top

Motion

  • --duration-instant
  • --duration-fast
  • --duration-normal
  • --duration-slow
  • --duration-slower
  • --ease-linear
  • --ease-out
  • --ease-in
  • --ease-in-out
  • --ease-spring
  • --transition-colors
  • --transition-shadow
  • --transition-transform
  • --transition-opacity
  • --opacity-disabled
  • --opacity-muted
  • --opacity-overlay

Buttons

A bare <button> is a finished secondary button. Each is- modifier owns one axis, intent, size, width, chrome or state, so they combine in any order. A link becomes a button with the .button class. The slots under the examples are what a theme retunes; this site sets the default height to the large one, so Default and Large match here.

Intent

A link as a button

Size

State

Group and block

Slots

  • --button-height
  • --button-height-sm
  • --button-height-lg
  • --button-height-hero
  • --button-padding-x
  • --button-padding-x-sm
  • --button-padding-x-lg
  • --button-radius
  • --button-font-size
  • --button-font-size-lg
  • --button-font-weight

Forms

Bare inputs, textareas and selects style themselves, checkboxes and radios too. .field wraps a label, its control and a .hint or .error under it, and form.is-grid lays fields out in two columns, with is-full spanning both. is-error and is-ok color the control; is-sm and is-lg size it.

The receipt goes here.

A handle has no spaces.

Notifications
Visibility

Slots

  • --input-height
  • --input-height-sm
  • --input-height-lg
  • --input-padding-x
  • --input-padding-y
  • --input-radius
  • --input-font-size
  • --input-bg
  • --input-border
  • --input-border-hover
  • --input-border-focus
  • --input-placeholder

Pills and badges

A .pill is a small rounded label for a status, a tag or a count. The intents color it with the matching status triple, and .pill-dot puts the status color in a dot ahead of the text.

Default Success Warning Danger Info Accent
Active Pending Failed Queued New 12 3 unread

Callouts

A left-bordered notice for a tip, a warning or a status. is-info is the default; is-success, is-warning, is-danger and is-accent recolor it with the matching soft fill and ink.

Info
Migrations run against the test database before tests, and against the app database before release.
Success
The build is ok. Every test passed and the release is live.
Warning
A raw ramp step does not flip in dark mode. Read the semantic token instead.
Danger
Deleting a project removes its database. There is no undo.
Accent
A theme is one import after the package, and every template reads it.

Cards

A bordered surface with .card-head, .card-body and .card-foot. The foot sits on --bg-soft and right-aligns its buttons. Each region is optional.

Profile

Body only

A card with no head and no foot is a bordered box with padding. The same card works inside any layout because it never sets a margin.

Tabs

Underline tabs. The stylesheet draws them; your template toggles is-active from the click handler and shows the matching panel with e:if. Click one.

The stylesheet draws the tab bar. Your template sets is-active on the current tab from its click handler and shows this panel with e:if.

Tables

A bare <table> is full width with small text, a rule under the header and soft rules between rows. Header cells are left-aligned and set in the soft ink; body cells align to the top. Wrap a wide table in a scrolling container on a phone.

TemplateCategoryImport
ButtonForms@elements/ui/button
ButtonGroupForms@elements/ui/button-group
InputForms@elements/ui/input
InputGroupForms@elements/ui/input-group
TextareaForms@elements/ui/textarea

Utilities

Single-purpose classes in @layer utilities, so they beat the components and lose to anything your app writes. Reach for one for a one-off adjustment; for a pattern that repeats, write a class. These are the families that come up; elements man style/reference/utilities lists every name.

FamilyClassesDoes
Display.flex.inline-flex.grid.block.hidden.contentsThe display mode. .hidden wins over everything.
Flex.items-center.items-baseline.justify-between.justify-end.flex-wrap.flex-1.shrink-0Alignment and growth inside a flex row.
Grid.grid-cols-2.grid-cols-3.grid-cols-12.col-span-2.col-span-fullEqual columns and spans.
Gap.gap-1.gap-2.gap-3.gap-4.gap-6.gap-8.gap-12The spacing scale as a gap, for flex and grid alike.
Space.p-4.px-6.py-2.mt-4.mb-8.mx-auto.m-0Padding and margin from the same scale.
Width.w-full.w-fit.max-w-prose.max-w-shell.max-w-md.min-w-0Widths, and the container scale as max-width.
Type.text-sm.text-lg.font-medium.font-semibold.font-mono.uppercase.tracked-wide.leading-snug.tabular.truncateSize, weight, family and tracking from the type tokens.
Color.text-ink.text-ink-soft.text-ink-dim.text-danger.bg-soft.bg-muted.bg-inverse.bg-accentSemantic ink and background. The filled ones set a readable ink too.
Border.border.border-t.border-b.border-strong.rounded-sm.rounded-md.rounded-fullRules and corners from the radius scale.
Shadow.shadow-xs.shadow-sm.shadow-md.shadow-lgThe shadow scale.
Position.relative.absolute.sticky.inset-0.z-overlay.z-modal.z-toastPositioning and the layering tokens.
State.hover:bg-muted.hover:text-ink.hover:underline.hover:shadow-mdHover variants, for the handful that come up.
Responsive.md:flex.md:grid-cols-3.md:hidden.lg:grid-cols-4.lg:hiddenmd: from 768px, lg: from 1024px.
Reach.sr-only.visually-hidden.select-none.pointer-events-noneScreen reader text and interaction guards.

Token names read from @elements/ui; values as this page computes them. elements man style prints the chapter and elements man style/reference/tokens every name.

Reference Style in the manual The rules, every token and every class.
Product
Manual Pricing Compare
Company
History Contact
Legal
Privacy Policy Acceptable Use Terms License Agreement
© Elements Dev Corporation 2026