AsterUIDocsv1.0.2

Docs / Guides

Design system

Card example

A card, a button and a tooltip each use different color roles. The card supplies a reading surface, the button needs a visible focus state, and the tooltip needs to stand out against the surface underneath. In the example above, open Code + CSS to see which decisions belong to the card and which belong to the page.

Choose roles before colors

Start a panel with --aster-surface and --aster-on-surface. Use semantic colors for a state such as success or danger, and give the state a text label so the reader can identify it without color. Inspect the badge and tooltip examples to see the foreground, background and border roles they use. Badge · Tooltip.

Change one seed across controls

The stylesheet provides six presets. Zinc gives the primary action a neutral color. The chromatic presets use a hue and chroma to derive related roles where the browser supports OKLCH. The shared stylesheet also defines fallback values. To inspect the change, switch the seed in the theme example and compare the badge before and after. The theme reference includes the controller and the token names. Try the theme cookbook · Inspect the theme source.

Check geometry, focus and motion

Use the controller's radius and density settings when controls across a page should change together. Tab through a button group, press Space to activate an enabled button and inspect its focus ring in each mode you support. The shared styles include media queries for coarse pointers, increased contrast and reduced motion. Check a customized component's scoped styles as well as the global theme. Exercise the button group · Inspect the shared stylesheet.

Separate a decision from its effects

An approval card can show who needs to act and report the choice through a callback. A workflow graph can show a review changing from waiting to done. In a production app, the caller would send the decision to a server and use the server's result to update the graph. The examples let you inspect those two pieces independently. Try ApprovalCard · Try WorkflowGraph.