elements
Start Docs Blog Demos UI Pricing
Elements Manual
  • Getting Started
  • CLI
  • Build
  • Browser
  • Packages
  • TypeScript
  • Elements HTML
  • Assets
  • RPC
  • Router
  • Session
  • Database
  • Migrations
  • LiveTable
  • Channel
  • Jobs
  • Email
  • Payments
  • JSON
  • Async
  • Style
    • Install
    • Tokens
    • Base elements
    • Typography
    • Layout
    • Components
    • Utilities
    • Theming
      • Branding
      • Dark mode
    • Overriding
    • Email
    • Reference
  • UI
  • JSOC
  • Config
  • Tests
  • Logs
  • Deploy
  • Editors
  • Recipes
  • Licenses
  • Issues
  • Changelog
Manual / Style/ Theming

Theming

elements man style/theming

On This Page

  • Monochrome by default
  • Branding sets the accent tokens
  • Dark mode is automatic
  • Topics

An Elements app is monochrome by default and takes a brand color from one override of the accent tokens.

Monochrome by default

themes/default.css sets --accent to --neutral-900. Since every primary button, link, focus ring, selected state, and accent surface reads --accent, an unbranded app is black-and-white, a deliberate, finished look with zero configuration. There is no "pick a color to get started" step.

Branding sets the accent tokens

Branding means overriding the accent token block in a theme rule imported after the package, inside @layer tokens:

Theme override
@import "@elements/ui"; @layer tokens { :root { --accent: #ff0080; --accent-deep: #cc0066; --accent-soft: #ffe0ef; --accent-ink: #5c0030; } }

Components that use the accent read these tokens, so the four lines recolor the whole system. The @layer tokens wrapper puts the override in the same layer as the default theme. Both rules use :root, and the override comes later, so its values apply. See branding (opens in a new tab) for the light-touch and full-ramp recipes.

Dark mode is automatic

Components never check whether the app is in light or dark mode. They only read semantic tokens (--bg, --ink, --accent, …). Because themes/default.css remaps those tokens for dark mode, anything built from tokens is dark-ready with no extra work. The OS preference is the default; a data-theme attribute on <html> forces a mode. See dark-mode (opens in a new tab).

  • branding (opens in a new tab): the one-accent override and the full brand-ramp recipe.
  • dark-mode (opens in a new tab): the OS preference, the data-theme toggle, and why components are dark-ready with no extra work.

Topics

style/theming/branding Repointing the accent tokens, and the full brand ramp.style/theming/dark-mode How the semantic tokens flip, and how to supply your own dark values.
Prev UtilitiesNext Branding
Product
Manual Pricing Compare
Company
History Contact
Legal
Privacy Policy Acceptable Use Terms License Agreement
© Elements Dev Corporation 2026