--- title: "Data Attributes" description: "Complete reference for ASW's data-attribute vocabulary — roles, states, text modifiers, nav, and agentic-specific patterns." type: docs weight: 50 date: 2026-04-09 tags: ["data-attributes", "css", "reference"] ai-disclosure: "generated" ai-model: "claude-sonnet-4-5" ai-provider: "Anthropic" --- ASW uses `data-*` attributes as its entire styling API. No class names are needed. Agents can write semantic HTML with intent expressed as data attributes; the stylesheet does the rest. --- ## data-role Semantic role indicator. Applied to the element that *is* the component. | Value | Element | Description | |-------|---------|-------------| | `primary` | `` | Filled CTA button | | `secondary` | `` | Outlined CTA button | | `card` | any | Card container | | `command-box` | `
` | Install/command pill with prefix glyph | | `status-card` | `
` | Bordered status block | | `diff` | `
` | Inline diff viewer (legacy; prefer `data-diff`) | | `log-entry` | any | Single log line, bottom border | | `list-item` | any | Minimal padding list item | | `prev-next` | `
` | Prev/next navigation pair | | `tag-cloud` | `
` | Tag cluster | | `timeline` | `
` | Simple left-spine timeline (legacy; prefer `data-layout="timeline"`) | ```html Read docs → Source
$ npm install agentic-css
``` --- ## data-status Semantic status state. Renders with mono font and status-appropriate colour. | Value | Colour | Use | |-------|--------|-----| | `awake` | accent (green) | Active, running | | `sleeping` | muted, italic | Idle, paused | | `blocked` | red | Waiting, error state | | `danger` | red | Critical state | | `warning` | orange | Caution | | `unknown` | dim | Indeterminate | ```html online waiting on DNS idle since 03:00 ``` --- ## data-task Task list item with state glyph. Apply to `
  • ` elements. | Value | Glyph | Colour | |-------|-------|--------| | `todo` | ○ | orange | | `done` | ● | accent | | `blocked` | ◐ | red | ```html
    • Deploy nginx config
    • Update DNS records
    • TLS cert — waiting on propagation
    ``` --- ## data-callout Advisory block with left border accent and optional title. | Value | Border colour | |-------|--------------| | *(default)* | blue | | `tip` | accent (green) | | `warning` | orange | | `error` | red | ```html
    Tip

    Use data attributes instead of class names.

    Warning

    This resets the token cascade.

    ``` --- ## data-text Text modifier. Supports multiple space-separated values. | Value | Effect | |-------|--------| | `dim` | `var(--text-3)` — muted | | `accent` | `var(--accent)` — green accent | | `eyebrow` | mono, uppercase, spaced — section label | | `small` | `var(--text-sm)` | | `mono` | monospace font | | `tagline` | larger, lighter — subtitle treatment | ```html

    Getting started

    Token System

    How the custom property hierarchy is structured.

    Last updated 2026-04-10

    --accent ``` --- ## data-layout Layout pattern. See [Layouts](/docs/layouts/) for the full reference. Common values: `docs`, `hero`, `install`, `actions`, `grid-2`, `grid-3`, `card-grid`, `stats`, `prose`, `fluid`, `timeline`, `report`. --- ## data-nav Navigation variant. Applied to `