` provides visual grouping only. Browsers don’t implement its semantic outline algorithm behavior, so ensure your heading hierarchy (``–``) remains correct for accessibility. The element is styled with appropriate spacing to group the heading and subtitle together. ### Default Rhythm [Section titled “Default Rhythm”](#default-rhythm) Headings, paragraphs, lists, blockquotes, and dividers include **sensible spacing** by default. You should rarely need to add manual spacing for typical long-form content. ## Text Roles (Optional) [Section titled “Text Roles (Optional)”](#text-roles-optional) Use text roles when semantics and appearance need to diverge: ``` Visually H1, semantically H2 Visually H3, semantically paragraph
Explicit body role
Caption text
Overline label Hero headline
``` Available roles: * `af-text-display` * `af-text-h1` … `af-text-h6` * `af-text-body` * `af-text-caption` * `af-text-overline` ## Page Patterns (Hero, Stats, Prose) [Section titled “Page Patterns (Hero, Stats, Prose)”](#page-patterns-hero-stats-prose) For marketing pages and dashboards: * **`af-eyebrow`** – Section label (uppercase, letter-spacing). Add `af-is-on-primary` for hero/CTA on primary background. * **`af-text-fluid-h1`**, **`af-text-fluid-h2`**, **`af-text-fluid-h3`** – Responsive hero headings (clamp-based). * **`af-stat-display`** – Large hero numbers (e.g. “12.4k”, “0”, “1”). * **`af-prose`** / **`af-measure`** – Readable line length (65ch). Variants: `af-measure-narrow` (45ch), `af-measure-wide` (80ch). ``` Why Airframe
Hero heading 12.4k
Long-form content with optimal line length
``` ## Typography Helpers (Minimal) [Section titled “Typography Helpers (Minimal)”](#typography-helpers-minimal) These are intentionally small and common: * `af-text-muted` – muted text color * `af-text-on-primary` – text on primary background (hero/CTA) * `af-text-on-primary-muted` – muted text on primary (opacity 0.7) * `af-text-mono` – monospace font * `af-text-sm` / `af-text-md` / `af-text-lg` – simple size helpers * `af-title` – quick title style ## Text Alignment (Dir-Aware) [Section titled “Text Alignment (Dir-Aware)”](#text-alignment-dir-aware) Text alignment utilities that respect document direction (LTR/RTL): ``` Centered text
Start-aligned (left in LTR, right in RTL)
End-aligned (right in LTR, left in RTL)
Responsive, RTL-safe heading ``` **Available classes:** * `af-text-center` – Center alignment * `af-text-start` – Start alignment (RTL-safe) * `af-text-end` – End alignment (RTL-safe) **Responsive variants (v0.1):** * `af-text-center@{bp}` – Center at breakpoint and up * `af-text-start@{bp}` – Start at breakpoint and up **Why `start`/`end` instead of `left`/`right`?** * `start` = left in LTR, right in RTL * `end` = right in LTR, left in RTL * Automatically respects `[dir="ltr"]` and `[dir="rtl"]` * No JavaScript needed * Standards-compliant and future-proof **Recommended Pattern:** ``` Responsive, RTL-safe heading ``` **Behavior:** * **xs / sm**: Centered * **md+ (LTR)**: Left-aligned * **md+ (RTL)**: Right-aligned ## Token Model [Section titled “Token Model”](#token-model) Typography uses semantic tokens so brands can override safely: ### Font Families [Section titled “Font Families”](#font-families) ``` :root { /* Font primitives */ --af-base-font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji"; --af-base-font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; /_ Semantic font tokens _/ --af-font-primary: var(--af-base-font-sans); /_ Primary font (used for body text by default) _/ --af-font-heading: var(--af-font-primary); /_ Heading font (applied to h1-h6, .af-text-h_, .af-text-display) _/ --af-font-body: var(--af-base-font-sans); /_ Body text font _/ --af-font-code: var(--af-base-font-mono); /_ Code font _/ --af-font-mono: var(--af-base-font-mono); /_ Monospace font */ } ``` **Customizing fonts:** ``` :root { /* Use custom web fonts */ --af-font-primary: 'Inter', 'Roboto', sans-serif; --af-font-heading: 'Playfair Display', serif; /* Different font for headings */ --af-font-body: var(--af-font-primary); /* Body uses primary */ } ``` ### Type Scale [Section titled “Type Scale”](#type-scale) ``` :root { /* Sizes */ --af-text-xs: 0.75rem; --af-text-sm: 0.875rem; --af-text-md: 1rem; --af-text-lg: 1.125rem; --af-text-xl: 1.25rem; --af-text-2xl: 1.5rem; --af-text-3xl: 1.875rem; /_ Leading (line-height) - typography term for vertical spacing between lines _/ /_ Use --af-leading-_ tokens; these map to CSS line-height property */ --af-leading-tight: 1.1; --af-leading-normal: 1.5; --af-leading-loose: 1.7; /_ Weights _/ --af-weight-regular: 400; --af-weight-medium: 500; --af-weight-semibold: 600; --af-weight-bold: 700; /_ Roles _/ --af-type-h1-size: var(--af-text-3xl); --af-type-h1-weight: var(--af-weight-semibold); --af-type-h1-leading: var(--af-leading-tight); --af-type-h1-tracking: -0.02em; --af-type-h2-tracking: -0.01em; --af-type-h3-tracking: 0em; --af-type-h4-tracking: 0em; --af-type-h5-tracking: 0em; --af-type-h6-tracking: 0em; } ``` ## Example: Card Title with Visual Override [Section titled “Example: Card Title with Visual Override”](#example-card-title-with-visual-override) ``` Card Title Body text remains semantic and readable.
``` ## Best Practices [Section titled “Best Practices”](#best-practices) * Prefer semantic elements (``–``, ` `, ``) by default. * Use text roles only when you need visual hierarchy overrides. * Override typography via tokens, not by increasing selector specificity. For class-level utilities (`af-text-*`, alignment, wrap), see [Typography utilities](/docs/utilities/typography).
# Utilities
> All utility classes with examples
This page provides an overview of all utility classes in @airframeui. Utilities are intentionally small and predictable. ## Responsive Suffix [Section titled “Responsive Suffix”](#responsive-suffix) Most utilities support responsive variants using the `@{bp}` suffix. See the dedicated [Responsive Suffix](/docs/responsive-suffix) page for syntax, breakpoints, and best practices. ## Utility Categories [Section titled “Utility Categories”](#utility-categories) * **[Spacing Utilities](/docs/utilities/spacing)** - Padding and margin utilities * **[Display & Alignment](/docs/utilities/display)** - Display, flexbox, and alignment utilities * **[Color Utilities](/docs/utilities/colors)** - Text, background, and border color utilities * **[Typography](/docs/utilities/typography)** — Semantic type defaults, text roles, and typography utilities * **[Layout Utilities](/docs/utilities/layout)** - Layout helpers, sizing, and density utilities * **[Interaction & Overflow](/docs/utilities/interaction)** - Focus, cursor, pointer events, and overflow utilities * **[Position Utilities](/docs/utilities/position)** - Position and placement utilities * **[Visibility & State](/docs/utilities/visibility)** - Visibility, state helpers, accessibility, and border utilities ## Notes [Section titled “Notes”](#notes) * Utilities are **intentionally minimal** to keep DOM readable. * Prefer layout recipes (`af-stack`, `af-inline`, `af-grid`) for larger composition. * Use responsive suffixes when needed: `@xs/@sm/@md/@lg/@xl/@2xl`.
# Color Utilities
> Text, background, and border color utility classes
Color utilities use semantic tokens that automatically adapt to light/dark themes and maintain proper contrast ratios. ## Class groups [Section titled “Class groups”](#class-groups) * **[Text color](/docs/utilities/colors/text-color)**: `af-text*` * **[Background color](/docs/utilities/colors/background-color)**: `af-bg-*` * **[Border color](/docs/utilities/colors/border-color)**: `af-border-*` (color only) * **[Gradients](/docs/utilities/colors/gradients)**: `af-gradient-*`
# Background color
> Semantic background utilities
Background utilities for surfaces and intents. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------------- | ----------------------------------------------------- | | `af-bg-background` | `background-color: var(--af-color-background)` | | `af-bg-surface` | `background-color: var(--af-color-surface-primary)` | | `af-bg-surface-secondary` | `background-color: var(--af-color-surface-secondary)` | | `af-bg-surface-tertiary` | `background-color: var(--af-color-surface-tertiary)` | | `af-bg-muted` | `background-color: var(--af-color-surface-secondary)` | | `af-bg-primary` | `background-color: var(--af-color-primary)` | | `af-bg-success` | `background-color: var(--af-color-success)` | | `af-bg-danger` | `background-color: var(--af-color-danger)` | | `af-bg-warning` | `background-color: var(--af-color-warning)` | | `af-bg-info` | `background-color: var(--af-color-info)` | | `af-bg-*-soft` | `background-color: var(--af-color-*-soft)` | | `af-bg-*-hard` | `background-color: var(--af-color-*-hard)` | ## Examples [Section titled “Examples”](#examples) Surface backgrounds Surface Secondary ```
Surface
Secondary
``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-bg-background` - Base background * `af-bg-surface` - Surface background (primary) * `af-bg-surface-secondary` - Secondary surface background * `af-bg-surface-tertiary` - Tertiary surface background * `af-bg-muted` - Muted surface background (same as surface-secondary) * `af-bg-primary` - Primary intent background * `af-bg-success` - Success intent background * `af-bg-danger` - Danger intent background * `af-bg-warning` - Warning intent background * `af-bg-info` - Info intent background * `af-bg-primary-soft` / `af-bg-success-soft` / `af-bg-danger-soft` / `af-bg-warning-soft` / `af-bg-info-soft` * `af-bg-primary-hard` / `af-bg-success-hard` / `af-bg-danger-hard` / `af-bg-warning-hard` / `af-bg-info-hard` When placing small text on a soft intent background, use the matching `*-hard` color (as badges/chips do), not the mid-tone intent token — soft + base often fails WCAG AA. For gradients, see [Gradients](/docs/utilities/colors/gradients). ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All background utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Text color](/docs/utilities/colors/text-color)
# Border color
> Semantic border color utilities
Border color utilities set the border color using semantic tokens. For border width utilities, see [Border width](/docs/utilities/visibility/border-width). ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------- | --------------------------------------------- | | `af-border-default` | `border-color: var(--af-color-border)` | | `af-border-muted` | mixed border color (subtle) | | `af-border-focus` | `border-color: var(--af-focus-ring-color)` | | `af-border-strong` | `border-color: var(--af-color-border-strong)` | | `af-border-primary` | `border-color: var(--af-color-primary)` | | `af-border-success` | `border-color: var(--af-color-success)` | | `af-border-danger` | `border-color: var(--af-color-danger)` | | `af-border-warning` | `border-color: var(--af-color-warning)` | | `af-border-info` | `border-color: var(--af-color-info)` | ## Examples [Section titled “Examples”](#examples) Border intents Primary border Danger border ``` Primary border
Danger border
``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-border-default` - Default border color * `af-border-muted` - Muted border color * `af-border-focus` - Focus border color * `af-border-strong` - Strong border color * `af-border-primary` - Primary intent border * `af-border-success` - Success intent border * `af-border-danger` - Danger intent border * `af-border-warning` - Warning intent border * `af-border-info` - Info intent border ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All border color utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Border width](/docs/utilities/visibility/border-width)
# Gradients
> Gradient utility classes
Gradient utilities built on design tokens (works in light/dark themes). ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | -------------------- | ------------------------------------------------------------------------ | | `af-gradient-accent` | `background-image: linear-gradient(135deg, primary → info)` | | `af-gradient-subtle` | `background-image: linear-gradient(180deg, surface → surface-secondary)` | | `af-gradient-border` | `background-image: linear-gradient(135deg, border → border-strong)` | ## Examples [Section titled “Examples”](#examples) Accent gradient ```
``` Subtle gradient ```
``` Border gradient ``` ``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-gradient-accent` * `af-gradient-subtle` * `af-gradient-border` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All gradient utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Background color](/docs/utilities/colors/background-color)
# Text color
> Semantic text color utilities
Color utilities use semantic tokens that automatically adapt to light/dark themes and maintain proper contrast ratios. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ----------------- | ------------------------------------- | | `af-text` | `color: var(--af-color-text)` | | `af-text-muted` | `color: var(--af-color-text-muted)` | | `af-text-inverse` | `color: var(--af-color-text-inverse)` | | `af-text-primary` | `color: var(--af-color-primary)` | | `af-text-link` | primary color + underline | | `af-text-success` | `color: var(--af-color-success)` | | `af-text-danger` | `color: var(--af-color-danger)` | | `af-text-warning` | `color: var(--af-color-warning)` | | `af-text-info` | `color: var(--af-color-info)` | ## Examples [Section titled “Examples”](#examples) Common text colors Default Muted Primary [Link](#) ``` Default
Muted
Primary
Link ``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-text` - Default text color * `af-text-muted` - Muted text color * `af-text-inverse` - Inverse text color * `af-text-primary` - Primary intent color * `af-text-link` - Link color * `af-text-success` - Success intent color * `af-text-danger` - Danger intent color * `af-text-warning` - Warning intent color * `af-text-info` - Info intent color Mid-tone intent text utilities (`af-text-success`, `af-text-warning`, `af-text-info`) can fail WCAG AA on white or soft backgrounds at small sizes. For soft surfaces and badge-like labels, use `--af-color-*-hard` (see [Tokens](/docs/tokens) and [Badge](/docs/patterns/badges-chips/badge)). ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All text color utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Background color](/docs/utilities/colors/background-color)
# Display & Alignment
> Display, flex, and alignment utility classes
Utilities for controlling display, flex direction, and alignment. **Layout recipes first:** For common patterns (horizontal wrap with gap, space-between, centered content), prefer [Layouts](/docs/layouts): `af-inline`, `af-cluster`, `af-spread`, `af-center`. Use these Display & Alignment utilities when you need custom combinations. ## Class groups [Section titled “Class groups”](#class-groups) * **[Display](/docs/utilities/display/display)**: `af-block`, `af-inline-block`, `af-flex`, `af-inline-flex` * **[Flex direction](/docs/utilities/display/flex-direction)**: `af-row*`, `af-col*`, `af-flex-reverse` * **[Justify content](/docs/utilities/display/justify-content)**: `af-justify-*` * **[Align items](/docs/utilities/display/align-items)**: `af-items-*` * **[Flex wrap](/docs/utilities/display/flex-wrap)**: `af-wrap`, `af-nowrap` * **[Vertical align](/docs/utilities/display/vertical-align)**: `af-align-*` For responsive show/hide utilities, see [Visibility](/docs/utilities/visibility/visibility).
# Align items
> Align items utilities
Utilities for aligning flex items along the cross axis. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------- | ------------------------- | | `af-items-start` | `align-items: flex-start` | | `af-items-center` | `align-items: center` | | `af-items-end` | `align-items: flex-end` | | `af-items-stretch` | `align-items: stretch` | | `af-items-baseline` | `align-items: baseline` | ## Examples [Section titled “Examples”](#examples) Basic example A B C ``` ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All align-items utilities support responsive variants using the `@{bp}` suffix: * `af-items-start@md` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Justify content](/docs/utilities/display/justify-content)
# Display
> Utilities for controlling display values
Utilities for controlling an element’s `display` value. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ----------------- | ----------------------- | | `af-block` | `display: block` | | `af-inline-block` | `display: inline-block` | | `af-flex` | `display: flex` | | `af-inline-flex` | `display: inline-flex` | ## Examples [Section titled “Examples”](#examples) ### Flex vs inline-flex [Section titled “Flex vs inline-flex”](#flex-vs-inline-flex) Use `af-flex` or `af-inline-flex` when you need a flex container without a layout recipe: Flex vs inline-flex A B ``` ``` For common layouts, prefer [layout recipes](/docs/layouts) (`af-stack`, `af-inline`, …) over raw display utilities. For responsive show/hide, see [Visibility](/docs/utilities/visibility/visibility). ## Responsive design [Section titled “Responsive design”](#responsive-design) Prefix a display utility with a breakpoint suffix to apply it from that breakpoint and up: ```
``` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Layouts](/docs/layouts) — semantic layout recipes that combine display, alignment, and gap * [Visibility](/docs/utilities/visibility/visibility)
# Flex direction
> Row/column direction utilities
Utilities for controlling flex direction. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ----------------- | -------------------------------- | | `af-row` | `flex-direction: row` | | `af-row-reverse` | `flex-direction: row-reverse` | | `af-col` | `flex-direction: column` | | `af-col-reverse` | `flex-direction: column-reverse` | | `af-flex-reverse` | `flex-direction: row-reverse` | ## Examples [Section titled “Examples”](#examples) Row vs column One Two Three ``` ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All flex-direction utilities support responsive variants using the `@{bp}` suffix: * `af-col@md` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Flex wrap](/docs/utilities/display/flex-wrap)
# Flex wrap
> Flex wrapping utilities
Utilities for controlling wrapping in flex containers. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ----------- | ------------------- | | `af-wrap` | `flex-wrap: wrap` | | `af-nowrap` | `flex-wrap: nowrap` | ## Examples [Section titled “Examples”](#examples) Wrap One Two Three Four ``` ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All wrap utilities support responsive variants using the `@{bp}` suffix: * `af-wrap@lg` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Flex direction](/docs/utilities/display/flex-direction)
# Justify content
> Justify content utilities
Utilities for aligning flex items along the main axis. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | -------------------- | -------------------------------- | | `af-justify-start` | `justify-content: flex-start` | | `af-justify-center` | `justify-content: center` | | `af-justify-end` | `justify-content: flex-end` | | `af-justify-between` | `justify-content: space-between` | | `af-justify-around` | `justify-content: space-around` | | `af-justify-evenly` | `justify-content: space-evenly` | ## Examples [Section titled “Examples”](#examples) Basic example A B C ``` ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All justify utilities support responsive variants using the `@{bp}` suffix: * `af-justify-center@lg` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Align items](/docs/utilities/display/align-items)
# Vertical align
> Vertical alignment utilities for inline elements
Utilities for vertical alignment of inline and inline-block elements. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------- | -------------------------- | | `af-align-top` | `vertical-align: top` | | `af-align-middle` | `vertical-align: middle` | | `af-align-bottom` | `vertical-align: bottom` | | `af-align-baseline` | `vertical-align: baseline` | ## Examples [Section titled “Examples”](#examples) Inline alignment Top Middle Bottom Baseline ``` Top Middle Bottom Baseline
``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All vertical-align utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Display](/docs/utilities/display/display)
# Interaction & Overflow Utilities
> Focus, cursor, pointer events, and overflow utility classes
Utilities for focus, input behavior, and overflow handling. ## Class groups [Section titled “Class groups”](#class-groups) * **[Focus ring](/docs/utilities/interaction/focus-ring)**: `af-focus-ring*`, `af-focus-none` * **[Outline](/docs/utilities/interaction/outline)**: `af-outline*` * **[Cursor](/docs/utilities/interaction/cursor)**: `af-cursor-*` * **[Pointer events](/docs/utilities/interaction/pointer-events)**: `af-pointer-*` * **[User select](/docs/utilities/interaction/user-select)**: `af-select-*` * **[Inert](/docs/utilities/interaction/inert)**: `af-inert` * **[Reduce motion](/docs/utilities/interaction/reduce-motion)**: `af-reduce-motion` * **[Overflow](/docs/utilities/interaction/overflow)**: `af-overflow*` * **[Scroll behavior](/docs/utilities/interaction/scroll-behavior)**: `af-scroll-smooth` * **[Scrollbar](/docs/utilities/interaction/scrollbar)**: `af-scrollbar`
# Cursor
> Cursor utilities
Utilities for cursor styles. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ----------------------- | --------------------- | | `af-cursor-pointer` | `cursor: pointer` | | `af-cursor-not-allowed` | `cursor: not-allowed` | ## Examples [Section titled “Examples”](#examples) Pointer cursor Hover me ``` Hover me ``` Not allowed cursor Not allowed cursor ``` Not allowed cursor
``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All cursor utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Pointer events](/docs/utilities/interaction/pointer-events)
# Focus ring
> Focus ring utilities
Utilities for consistent focus treatment. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ----------------------------------- | ------------------------------------------------------------------------------- | | `af-focus-ring:focus-visible` | `outline: var(--af-focus-ring-width) solid var(--af-focus-ring-color)` + offset | | `af-focus-ring-inset:focus-visible` | inset ring via `box-shadow` | | `af-focus-none:focus-visible` | `outline: none` | ## Examples [Section titled “Examples”](#examples) Focus ring Tab to focus ``` Tab to focus ``` Inset focus ring Tab to focus ``` Tab to focus ``` No focus outline Tab to focus ``` Tab to focus ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All focus utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Outline](/docs/utilities/interaction/outline)
# Inert
> Inert subtree utility
`af-inert` disables interaction within a subtree (it sets `pointer-events: none` and `user-select: none`). ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ---------- | ----------------------------------------- | | `af-inert` | `pointer-events: none; user-select: none` | ## Examples [Section titled “Examples”](#examples) Disable a subtree Can’t be clicked ``` Can't be clicked
``` ## Related [Section titled “Related”](#related) * [Pointer events](/docs/utilities/interaction/pointer-events)
# Outline
> Outline utilities
Utilities for outline and outline offset. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | --------------------- | ---------------------------------------------------- | | `af-outline` | `outline: var(--af-border-width) solid currentColor` | | `af-outline-0` | `outline: 0` | | `af-outline-offset-2` | `outline-offset: 2px` | | `af-outline-offset-4` | `outline-offset: 4px` | ## Examples [Section titled “Examples”](#examples) Outline Outline ``` Outline ``` Outline offset 4 Outline ``` Outline ``` Remove outline No outline ``` No outline ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All outline utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Focus ring](/docs/utilities/interaction/focus-ring)
# Overflow
> Overflow and scrolling utilities
Utilities for overflow behavior (clipping or scrolling overflow content). ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | --------------------- | ------------------- | | `af-overflow-hidden` | `overflow: hidden` | | `af-overflow-auto` | `overflow: auto` | | `af-overflow-scroll` | `overflow: scroll` | | `af-overflow-visible` | `overflow: visible` | | `af-overflow-x-auto` | `overflow-x: auto` | | `af-overflow-y-auto` | `overflow-y: auto` | ## Examples [Section titled “Examples”](#examples) Horizontal scrolling Item 1Item 2 Item 3Item 4 Item 5 ``` Item 1 Item 2 Item 3 Item 4 Item 5
``` Clip overflow (hidden) This is clipped ``` ``` Scroll overflow (auto) Scroll me ``` ``` Always show scrollbars (scroll) Scroll me ``` ``` Let overflow show (visible) I overflow ``` I overflow
``` Vertical scrolling (overflow-y-auto) Scroll me ``` ``` For scroll behavior and styled scrollbars, see: * [Scroll behavior](/docs/utilities/interaction/scroll-behavior) * [Scrollbar](/docs/utilities/interaction/scrollbar) ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) Responsive variants are generated for `af-overflow-hidden` only (e.g. `af-overflow-hidden@md`). The other overflow utilities do not currently have responsive variants. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Scrollbar](/docs/utilities/interaction/scrollbar)
# Pointer events
> Pointer events utilities
Utilities for enabling/disabling pointer events. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ----------------- | ---------------------- | | `af-pointer-none` | `pointer-events: none` | | `af-pointer-auto` | `pointer-events: auto` | ## Examples [Section titled “Examples”](#examples) Disable clicks Not clickable ``` Not clickable ``` Re-enable pointer events Clickable ``` Clickable
``` ## Related [Section titled “Related”](#related) * [User select](/docs/utilities/interaction/user-select)
# Reduce motion
> Reduced motion utility
Use `af-reduce-motion` to reduce or remove animations in a subtree for users who prefer reduced motion. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------ | -------------------------------------------------------------- | | `af-reduce-motion` | Forces near-zero animation/transition durations within subtree | ## Examples [Section titled “Examples”](#examples) Reduce motion in a subtree ``` ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All reduce-motion utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Scroll behavior](/docs/utilities/interaction/scroll-behavior)
# Scroll behavior
> Scroll behavior utilities
Utilities for scroll behavior. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------ | ------------------------- | | `af-scroll-smooth` | `scroll-behavior: smooth` | ## Examples [Section titled “Examples”](#examples) Smooth scrolling [Scroll smoothly](#demo-anchor) Anchor ``` Scroll smoothly
Anchor
``` ## Related [Section titled “Related”](#related) * [Overflow](/docs/utilities/interaction/overflow)
# Scrollbar
> Styled scrollbar utility
Use `af-scrollbar` for a modern styled scrollbar that adapts to your theme. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | -------------- | -------------------------------------------------------- | | `af-scrollbar` | Styled scrollbars (Firefox + WebKit) using design tokens | ## Examples [Section titled “Examples”](#examples) Styled scrollbar Scroll to see the styled scrollbar thumb. ``` ``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-scrollbar` ## Related [Section titled “Related”](#related) * [Overflow](/docs/utilities/interaction/overflow)
# User select
> Text selection utilities
Utilities for controlling text selection. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ---------------- | ------------------- | | `af-select-none` | `user-select: none` | | `af-select-text` | `user-select: text` | ## Examples [Section titled “Examples”](#examples) Disable selection Try selecting this text. ``` Try selecting this text.
``` Allow text selection This part can be selected. This part can’t. ``` This part can be selected. This part can't.
``` ## Related [Section titled “Related”](#related) * [Pointer events](/docs/utilities/interaction/pointer-events)
# Layout Utilities
> Layout helpers, sizing, and density utility classes
Utilities for sizing, flex sizing, and density controls. ## Class groups [Section titled “Class groups”](#class-groups) * **[Sizing](/docs/utilities/layout/sizing)**: `af-w-full`, `af-h-full`, `af-min-w-0`, `af-min-h-0` * **[Flex sizing](/docs/utilities/layout/flex-sizing)**: `af-grow*`, `af-shrink*`, `af-basis-*` * **[Align self](/docs/utilities/layout/align-self)**: `af-self-*` * **[Order](/docs/utilities/layout/order)**: `af-order-*` * **[Density & hit area](/docs/utilities/layout/density-hit-area)**: `af-hit*`, `af-density-*`, `af-control-padding`
# Align self
> Self-alignment utilities
Utilities for aligning a single flex/grid item. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------ | ------------------------ | | `af-self-start` | `align-self: flex-start` | | `af-self-center` | `align-self: center` | | `af-self-end` | `align-self: flex-end` | | `af-self-stretch` | `align-self: stretch` | | `af-self-baseline` | `align-self: baseline` | ## Examples [Section titled “Examples”](#examples) Center one item A af-self-center C ``` ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All align-self utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Align items](/docs/utilities/display/align-items)
# Density & hit area
> Hit target and density utilities
Utilities for consistent hit targets and control density. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------------ | ------------------------------------------------------------------ | | `af-hit` | `min-width/min-height: var(--af-hit-size)` | | `af-hit-44` | `min-width/min-height: 44px` | | `af-density-compact` | sets `--af-control-padding-*` to compact values | | `af-density-comfortable` | sets `--af-control-padding-*` to comfortable values | | `af-control-padding` | `padding: var(--af-control-padding-y) var(--af-control-padding-x)` | ## Examples [Section titled “Examples”](#examples) Hit target af-hit ``` af-hit ``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-hit` * `af-hit-44` * `af-density-compact` / `af-density-comfortable` * `af-control-padding` Token: `--af-hit-size` defaults to `2.75rem` (44px). ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) Responsive variants are generated for `af-hit` and `af-hit-44` only. `af-density-compact`, `af-density-comfortable`, and `af-control-padding` do not currently have responsive variants. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Sizing](/docs/utilities/layout/sizing)
# Flex sizing
> Flex grow, shrink, and basis utilities
Utilities for controlling how flex items grow, shrink, and size. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | --------------- | ------------------ | | `af-grow` | `flex-grow: 1` | | `af-grow-0` | `flex-grow: 0` | | `af-shrink` | `flex-shrink: 1` | | `af-shrink-0` | `flex-shrink: 0` | | `af-basis-0` | `flex-basis: 0` | | `af-basis-auto` | `flex-basis: auto` | ## Examples [Section titled “Examples”](#examples) Grow Fixed af-grow ``` ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All flex sizing utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Order](/docs/utilities/layout/order)
# Order
> Flex and grid order utilities
Utilities for controlling visual order of items. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------ | ------------- | | `af-order-first` | `order: -1` | | `af-order-default` | `order: 0` | | `af-order-{1..6}` | `order: ` | | `af-order-last` | `order: 9999` | ## Examples [Section titled “Examples”](#examples) Reorder A (order 2) B (order 1) C (order 3) ``` A (order 2)
B (order 1)
C (order 3)
``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All order utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Flex sizing](/docs/utilities/layout/flex-sizing)
# Sizing
> Width/height and min-size utilities
Utilities for sizing elements. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------ | --------------- | | `af-w-full` | `width: 100%` | | `af-h-full` | `height: 100%` | | `af-min-w-0` | `min-width: 0` | | `af-min-h-0` | `min-height: 0` | ## Examples [Section titled “Examples”](#examples) Full width af-w-full ``` ``` ## Responsive design [Section titled “Responsive design”](#responsive-design) Prefix a sizing utility with a breakpoint suffix to apply it from that breakpoint and up: ```
``` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Flex sizing](/docs/utilities/layout/flex-sizing)
# Position Utilities
> Position and placement utility classes
Utilities for controlling positioning and offsets. ## Class groups [Section titled “Class groups”](#class-groups) * **[Position](/docs/utilities/position/position)**: `af-pos-*` (and aliases) * **[Inset](/docs/utilities/position/inset)**: `af-inset-0`, `af-top-0`, `af-right-0`, `af-bottom-0`, `af-left-0`
# Inset
> Top/right/bottom/left offset utilities
Utilities for positioning offsets. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------- | ----------- | | `af-inset-0` | `inset: 0` | | `af-top-0` | `top: 0` | | `af-right-0` | `right: 0` | | `af-bottom-0` | `bottom: 0` | | `af-left-0` | `left: 0` | ## Available classes [Section titled “Available classes”](#available-classes) * `af-inset-0` (all edges) * `af-top-0` / `af-right-0` / `af-bottom-0` / `af-left-0` (individual edges) ## Examples [Section titled “Examples”](#examples) Full overlay Overlay ``` ``` Pin to corners TL TR BL BR ``` ``` ## Related [Section titled “Related”](#related) * [Position](/docs/utilities/position/position)
# Position
> Positioning utilities
Utilities for controlling positioning mode. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | --------------------------------- | -------------------- | | `af-pos-relative` / `af-relative` | `position: relative` | | `af-pos-absolute` / `af-absolute` | `position: absolute` | | `af-pos-sticky` / `af-sticky` | `position: sticky` | | `af-pos-revert` | `position: revert` | ## Available classes [Section titled “Available classes”](#available-classes) * `af-pos-relative` * `af-pos-absolute` * `af-pos-sticky` * `af-pos-revert` * `af-relative` / `af-absolute` / `af-sticky` For offsets, see [Inset (top/right/bottom/left)](/docs/utilities/position/inset). ## Examples [Section titled “Examples”](#examples) Absolute positioning Top right ``` ``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) Responsive variants are generated for `af-pos-relative`, `af-pos-absolute`, `af-pos-sticky`, and `af-pos-revert`. The aliases (`af-relative`, `af-absolute`, `af-sticky`) do not currently have responsive variants. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Inset](/docs/utilities/position/inset)
# Spacing Utilities
> Padding and margin utility classes
Spacing utilities for padding and margin. ## Class groups [Section titled “Class groups”](#class-groups) * **[Padding](/docs/utilities/spacing/padding)**: `af-p-*`, `af-px-*`, `af-py-*`, `af-pt-*`, `af-pr-*`, `af-pb-*`, `af-pl-*` * **[Margin](/docs/utilities/spacing/margin)**: `af-m-*`, `af-mx-*`, `af-my-*`, `af-mt-*`, `af-mr-*`, `af-mb-*`, `af-ml-*`, `af-mx-auto` Gap utilities are documented in [Grid](/docs/grid) (source of truth for `af-gap-*`).
# Margin
> Utilities for controlling an element's margin
Utilities for controlling an element’s margin (space outside an element). ## Quick reference [Section titled “Quick reference”](#quick-reference) Scale: `0` · `xs` · `sm` · `md` · `lg` · `xl` · `2xl` · `3xl` · `4xl` (maps to `--af-space-0`…`8`). | Class | Styles | | ------------ | ---------------------------------- | | `af-m-*` | `margin: var(--af-space-*)` | | `af-mx-*` | `margin-inline: var(--af-space-*)` | | `af-my-*` | `margin-block: var(--af-space-*)` | | `af-mt-*` | `margin-top: var(--af-space-*)` | | `af-mr-*` | `margin-right: var(--af-space-*)` | | `af-mb-*` | `margin-bottom: var(--af-space-*)` | | `af-ml-*` | `margin-left: var(--af-space-*)` | | `af-mx-auto` | `margin-inline: auto` | ## Examples [Section titled “Examples”](#examples) ### Basic margin [Section titled “Basic margin”](#basic-margin) Use `af-m-*` utilities like `af-m-md` and `af-m-lg` to control margin on all sides: Basic margin af-m-lg ``` af-m-lg
``` ### Auto centering [Section titled “Auto centering”](#auto-centering) Use `af-mx-auto` to center a block horizontally: Auto centering af-mx-auto ``` ``` ## Responsive design [Section titled “Responsive design”](#responsive-design) Prefix a margin utility with a breakpoint suffix to apply it from that breakpoint and up: ```
``` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Customizing your theme [Section titled “Customizing your theme”](#customizing-your-theme) Margin utilities are driven by the `--af-space-*` tokens. Override them in CSS — no rebuild required: ``` :root { --af-space-sm: 0.5rem; --af-space-md: 1rem; --af-space-lg: 1.5rem; } ``` See [Theming](/docs/theming) and [Tokens](/docs/tokens) for the full spacing scale. ## Related [Section titled “Related”](#related) * [Padding](/docs/utilities/spacing/padding)
# Padding
> Utilities for controlling an element's padding
Utilities for controlling an element’s padding (space inside an element). ## Quick reference [Section titled “Quick reference”](#quick-reference) Scale: `0` · `xs` · `sm` · `md` · `lg` · `xl` · `2xl` · `3xl` · `4xl` (maps to `--af-space-0`…`8`). | Class | Styles | | --------- | ----------------------------------- | | `af-p-*` | `padding: var(--af-space-*)` | | `af-px-*` | `padding-inline: var(--af-space-*)` | | `af-py-*` | `padding-block: var(--af-space-*)` | | `af-pt-*` | `padding-top: var(--af-space-*)` | | `af-pr-*` | `padding-right: var(--af-space-*)` | | `af-pb-*` | `padding-bottom: var(--af-space-*)` | | `af-pl-*` | `padding-left: var(--af-space-*)` | ## Examples [Section titled “Examples”](#examples) ### Basic padding [Section titled “Basic padding”](#basic-padding) Use `af-p-*` utilities like `af-p-sm` and `af-p-lg` to control padding on all sides: Basic padding Padded content ``` ``` ### Directional padding [Section titled “Directional padding”](#directional-padding) Use axis and side utilities (`af-px-*`, `af-py-*`, `af-pt-*`, …) for finer control: Directional padding px + py pt + pr + pb + pl ``` px + py
pt + pr + pb + pl
``` ## Responsive design [Section titled “Responsive design”](#responsive-design) Prefix a padding utility with a breakpoint suffix to apply it from that breakpoint and up: ```
``` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Customizing your theme [Section titled “Customizing your theme”](#customizing-your-theme) Padding utilities are driven by the `--af-space-*` tokens. Override them in CSS — no rebuild required: ``` :root { --af-space-sm: 0.5rem; --af-space-md: 1rem; --af-space-lg: 1.5rem; } ``` See [Theming](/docs/theming) and [Tokens](/docs/tokens) for the full spacing scale. ## Related [Section titled “Related”](#related) * [Margin](/docs/utilities/spacing/margin)
# Typography
> Semantic headings, text roles, and typography utility classes
Airframe styles **semantic HTML** first (``–``, ` `, ``). Use **`af-text-*` roles** only when the accessible heading level and the visual size should differ. For the type scale, tokens, and deep customization, see the **[Typography guide](/docs/typography)** and **[Tokens](/docs/tokens)**. For small utility tweaks (muted, mono, `af-title`), see **[Text style](/docs/utilities/typography/text-style)** below. ## Semantic type & text roles [Section titled “Semantic type & text roles”](#semantic-type--text-roles) ### Quick reference [Section titled “Quick reference”](#quick-reference) | Markup | When to use | | ---------------------------------------- | --------------------------------------------------------------------------------------------------------- | | `` … `` | Default: real document outline and visual hierarchy match. | | `` … `af-text-h6` | Same outline, different **visual** level (e.g. page title look on a section heading). | | `
` | **Rare:** paragraph or span that should **look** like a heading but must not be a heading in the outline. | | `.af-text-display`, `.af-text-fluid-h1` | Marketing hero / large display (not a substitute for a real `
` when one is needed). | ### Semantic headings [Section titled “Semantic headings”](#semantic-headings) Use one real `` per page (or main landmark) when you are establishing the outline. Levels **h2–h6** nest under it. Default Airframe styles apply automatically—no classes required. *Previews on this page start at `` so they don’t add a second page-level `` next to the docs title. Use `` on your site the same way as in the snippet.* Heading levels h1–h6 ## Monthly summary ### Revenue #### North America ##### Enterprise accounts ###### Last updated Preview starts at h2; add `h1` for your main title (see code tab). ``` Reports dashboard Monthly summary Revenue North America Enterprise accounts Last updated ``` ### Text roles (semantics vs visuals) [Section titled “Text roles (semantics vs visuals)”](#text-roles-semantics-vs-visuals) Prefer fixing the **heading level** in the markup whenever you can. Use `af-text-h1` … `af-text-h6` when the correct accessible level is already chosen but the **visual** step should be different. Visual override with af-text-\* ## Looks like H1, outline says H2 ### Compact section title ``` Looks like H1, outline says H2 Compact section title ``` Optional **paragraph-sized** roles for copy that should not be headings in the tree: Body, caption, lead, overline Regular body text. Explicit body role (same as an unclassed paragraph). Lead — larger intro, muted color. Caption / fine print. Overline label ``` Regular body text.
Explicit body role (same default as plain p).
Lead — larger intro, muted color.
Caption / fine print.
Overline label ``` ### Display and marketing type [Section titled “Display and marketing type”](#display-and-marketing-type) For heroes, stats, and section labels—**still pair with a proper heading** where SEO and assistive tech need a real outline. Display, fluid headings, eyebrow, stat Product Ship faster with less CSS ## Responsive hero (fluid) 12.4k ``` Product
Ship faster with less CSS
Responsive hero (fluid) 12.4k
``` On primary surfaces, use **`af-is-on-primary`** with `af-eyebrow` so contrast stays readable. ### Heading groups [Section titled “Heading groups”](#heading-groups) Use **``** to group a heading with a subtitle or tagline (hero, card header, page title). hgroup + lead ## Invoices Review and send billing in one place. ``` Invoices Review and send billing in one place.
``` `` only affects **layout**. It does not fix a wrong outline: keep **h1 → h2 → h3** order meaningful for [keyboard and screen reader users](/docs/accessibility/keyboard-focus). ### Readable line length [Section titled “Readable line length”](#readable-line-length) Wrap long-form copy in **`af-prose`** or **`af-measure`** (65ch). Narrow: **`af-measure-narrow`** (45ch). Wide: **`af-measure-wide`** (80ch). ``` Chapter title Paragraphs stay within a comfortable measure.
``` ### Blockquote [Section titled “Blockquote”](#blockquote) ``` Quoted statement with default blockquote styling.
``` ### Inline code [Section titled “Inline code”](#inline-code) ``` Use const x = 1 inside sentences.
``` ## Utility class groups [Section titled “Utility class groups”](#utility-class-groups) Sizing, alignment, wrapping, and numeric helpers live in dedicated pages: * **[Text style](/docs/utilities/typography/text-style)** — `af-text-muted`, `af-text-sm` / `md` / `lg`, `af-title`, `af-text-strong`, … * **[Text wrapping & clamp](/docs/utilities/typography/text-wrap)** — `af-text-nowrap`, `af-text-break`, `af-clamp*` * **[Text alignment](/docs/utilities/typography/text-align)** — `af-text-center`, `af-text-start`, `af-text-end` * **[Numeric](/docs/utilities/typography/numeric)** — `af-numeric` ## Related [Section titled “Related”](#related) * [Typography guide](/docs/typography) — philosophy, tokens, PostCSS typography output * [Tokens](/docs/tokens) — `--af-type-*` and font variables
# Numeric
> Numeric typography utilities
Utilities for numeric typography (tabular numerals). ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------ | ------------------------------------ | | `af-numeric` | `font-variant-numeric: tabular-nums` | ## Examples [Section titled “Examples”](#examples) Tabular numerals 1,234.56 98,765.43 ``` ``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-numeric` (tabular numerals) ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All numeric utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Text wrapping & clamp](/docs/utilities/typography/text-wrap)
# Text alignment
> Direction-aware text alignment utilities
Text alignment utilities that respect document direction (LTR/RTL). ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ---------------- | --------------------------- | | `af-text-center` | center align | | `af-text-start` | start align (LTR/RTL aware) | | `af-text-end` | end align (LTR/RTL aware) | ## Examples [Section titled “Examples”](#examples) Start/end alignment Start aligned End aligned ``` Start aligned
End aligned
``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-text-center` – Center alignment * `af-text-start` – Start alignment (RTL-safe) * `af-text-end` – End alignment (RTL-safe) ## Why `start`/`end`? [Section titled “Why start/end?”](#why-startend) * Automatically respects `[dir="ltr"]` and `[dir="rtl"]` * `start` = left in LTR, right in RTL * `end` = right in LTR, left in RTL * No JavaScript needed * Standards-compliant ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All alignment utilities support responsive variants using the `@{bp}` suffix: * `af-text-center@{bp}` * `af-text-start@{bp}` * `af-text-end@{bp}` See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Text style](/docs/utilities/typography/text-style)
# Text style
> Text sizing and typographic helper utilities
Utilities for common typographic treatments and sizes. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ----------------- | ---------------------------------------- | | `af-text-muted` | `color: var(--af-color-text-muted)` | | `af-text-mono` | `font-family: var(--af-font-code)` | | `af-text-sm` | `font-size: var(--af-text-sm)` | | `af-text-md` | `font-size: var(--af-text-md)` | | `af-text-lg` | `font-size: var(--af-text-lg)` | | `af-text-body-sm` | `font-size: var(--af-text-sm)` | | `af-text-strong` | `font-weight: var(--af-weight-semibold)` | | `af-title` | large title style (2xl + semibold) | ## Examples [Section titled “Examples”](#examples) Text size af-text-sm af-text-md af-text-lg ``` af-text-sm
af-text-md
af-text-lg
``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-text-muted` * `af-text-mono` * `af-text-sm` * `af-text-md` * `af-text-lg` * `af-text-body-sm` * `af-text-strong` * `af-title` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All text style utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Text alignment](/docs/utilities/typography/text-align)
# Text wrapping & clamp
> Wrapping, breaking, and line-clamp utilities
Utilities for controlling wrapping, breaking long strings, and line clamping. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------------------------------ | ------------------------------------------------- | | `af-text-nowrap` | `white-space: nowrap` | | `af-text-break` | `overflow-wrap: anywhere; word-break: break-word` | | `af-clamp` / `af-clamp-1` | 1-line clamp | | `af-clamp-2` / `af-clamp-3` / `af-clamp-4` | multi-line clamp | ## Available classes [Section titled “Available classes”](#available-classes) * `af-text-nowrap` * `af-text-break` * `af-clamp` / `af-clamp-1` (equivalent - clamp to 1 line) * `af-clamp-2` / `af-clamp-3` / `af-clamp-4` ## Examples [Section titled “Examples”](#examples) Clamp to 2 lines A long paragraph that will be clamped to two lines. Add enough text and you’ll see it truncate after the second line. ``` A long paragraph that will be clamped to two lines. Add enough text and you'll see it truncate after the second line.
``` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All wrapping utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Numeric](/docs/utilities/typography/numeric)
# Visibility & State Utilities
> Visibility, state helpers, accessibility, and border utilities
Utilities for responsive visibility, state helpers, and “UI primitives” like border width, radius, and shadow. ## Class groups [Section titled “Class groups”](#class-groups) * **[Border width](/docs/utilities/visibility/border-width)**: `af-border`, `af-border-0` * **[Radius](/docs/utilities/visibility/radius)**: `af-radius-*` * **[Shadow](/docs/utilities/visibility/shadow)**: `af-shadow-*` * **[State helpers](/docs/utilities/visibility/state)**: `af-is-*`, `af-has-*` * **[Visibility](/docs/utilities/visibility/visibility)**: `af-hidden*`, `af-show*` Screen reader utilities (`af-sr-only`, `af-sr-only-focusable`) are documented in [Screen Reader Utilities](/docs/accessibility/screen-readers). For border colors, see [Color Utilities](/docs/utilities/colors).
# Border width
> Border width utilities
Utilities for enabling/disabling borders. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------- | ------------------------------------------------------------- | | `af-border` | `border: var(--af-border-width) solid var(--af-color-border)` | | `af-border-0` | `border: 0` | ## Examples [Section titled “Examples”](#examples) Border on/off af-border af-border-0 ``` af-border
af-border-0
``` For border colors, see [Border color](/docs/utilities/colors/border-color). ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) Responsive variants are not generated for `af-border-0`. Note: `af-border@{bp}` exists but only sets `border-color` (it won’t “turn on” a border by itself). See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Border color](/docs/utilities/colors/border-color)
# Radius
> Border radius utilities
Utilities for border radius. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ---------------- | ------------------------------------ | | `af-radius-sm` | `border-radius: var(--af-radius-sm)` | | `af-radius-md` | `border-radius: var(--af-radius-md)` | | `af-radius-lg` | `border-radius: var(--af-radius-lg)` | | `af-radius-full` | `border-radius: 9999px` | ## Examples [Section titled “Examples”](#examples) Radius af-radius-sm af-radius-lg ``` af-radius-sm
af-radius-lg
``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-radius-sm` * `af-radius-md` * `af-radius-lg` * `af-radius-full` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All radius utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Shadow](/docs/utilities/visibility/shadow)
# Shadow
> Shadow utilities
Utilities for shadows. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | -------------- | --------------------------------- | | `af-shadow-sm` | `box-shadow: var(--af-shadow-sm)` | | `af-shadow-md` | `box-shadow: var(--af-shadow-md)` | | `af-shadow-lg` | `box-shadow: var(--af-shadow-lg)` | ## Examples [Section titled “Examples”](#examples) Shadow af-shadow-sm ``` af-shadow-sm
``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-shadow-sm` * `af-shadow-md` * `af-shadow-lg` ## Responsive variants [Section titled “Responsive variants”](#responsive-variants) All shadow utilities support responsive variants using the `@{bp}` suffix. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Radius](/docs/utilities/visibility/radius)
# State helpers
> State helper utilities
Utilities for communicating state in the DOM. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ---------------- | --------------------------------------------------------- | | `af-is-disabled` | `opacity: 0.6; cursor: not-allowed; pointer-events: none` | | `af-is-loading` | `opacity: 0.7; pointer-events: none` | | `af-is-active` | `opacity: 0.9` | | `af-is-muted` | `opacity: 0.6` | | `af-has-error` | `border-color: var(--af-color-danger)` | | `af-has-focus` | `border-color: var(--af-color-primary)` | ## Examples [Section titled “Examples”](#examples) Disabled Disabled ``` Disabled ``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-is-disabled` * `af-is-loading` * `af-is-active` * `af-is-muted` * `af-has-error` * `af-has-focus` ## Related [Section titled “Related”](#related) * [Visibility](/docs/utilities/visibility/visibility)
# Visibility
> Responsive show/hide utilities
Utilities for controlling whether content is shown or hidden. ## Quick reference [Section titled “Quick reference”](#quick-reference) | Class | Styles | | ------------------------------------------- | ------------------------------- | | `af-hidden` | `display: none !important` | | `af-show` | `display: revert !important` | | `af-hidden@{bp}` / `af-show@{bp}` | apply from breakpoint and up | | `af-hidden@{bp}-only` / `af-show@{bp}-only` | apply only for given breakpoint | ## Examples [Section titled “Examples”](#examples) Basic Visible Hidden ``` ``` ## Available classes [Section titled “Available classes”](#available-classes) * `af-hidden` * `af-show` * `af-hidden@xs` through `af-hidden@2xl` (applies from breakpoint and up) * `af-show@xs` through `af-show@2xl` (applies from breakpoint and up) * `af-hidden@xs-only` through `af-hidden@xl-only` (applies only at specific breakpoint range) * `af-show@xs-only` through `af-show@xl-only` (applies only at specific breakpoint range) ## Breakpoint-only ranges [Section titled “Breakpoint-only ranges”](#breakpoint-only-ranges) * `@xs-only`: 360px - 639px * `@sm-only`: 640px - 767px * `@md-only`: 768px - 1023px * `@lg-only`: 1024px - 1279px * `@xl-only`: 1280px - 1535px ## Responsive design [Section titled “Responsive design”](#responsive-design) Visibility utilities are built around the `@{bp}` and `@{bp}-only` suffixes. See [Responsive Suffix](/docs/responsive-suffix) for syntax and breakpoints. ## Related [Section titled “Related”](#related) * [Display](/docs/utilities/display/display) * [Responsive Suffix](/docs/responsive-suffix)