# DV Layer — full component reference > Generated from `@ai-*` JSDoc headers (v0.22.0). For the index, see llms.txt. ## accordion Groups expandable content sections under disclosure buttons. - Base class: `dv-accordion` - React: `` - Element: `div` - Source: packages/html/src/css/components/_accordion.css, packages/react/src/components/Accordion.tsx, packages/html/src/js/components/accordion.js - Modifiers: `dv-accordion__item--open`, `dv-accordion__item--disabled` ### HTML ```html

Panel content here

``` ### React ```tsx Section 1 Content for section 1 Section 2 Content for section 2 ``` ### Props ```ts open?: string[] defaultOpen?: string[] onOpenChange?: (open: string[]) => void allowMultiple?: boolean allowCollapse?: boolean borderless?: boolean ``` ### Events - `open` — Fired before panel opens (cancelable with preventDefault) - `opened` — Fired after panel has opened - `close` — Fired before panel closes (cancelable with preventDefault) - `closed` — Fired after panel has closed ### Keyboard - Up/Down arrows: Navigate between items - Home: Go to first item - End: Go to last item ### Options - `allowMultiple` (default: `false`) - `allowCollapse` (default: `true`) - `announceChange` (default: `true`) ### Accessibility - Trigger button MUST have aria-expanded - Author closed panels with the hidden attribute (no-JS-safe). At runtime the JS removes hidden and instead toggles inert + aria-hidden="true" so the panel stays mounted and the open/close height transition can run both ways — it never re-applies hidden/display:none - Use aria-controls to associate trigger with panel - Wrap each trigger in the __header heading element (APG Accordion) at the level the surrounding document calls for — without it the panels are unreachable by heading navigation, which is how screen-reader users skim an accordion ### Avoid - Nesting accordions more than one level deep --- ## alert Displays an inline informational, success, warning, or error message. - Base class: `dv-alert` - React: `` - Element: `div` - Source: packages/html/src/css/components/_alert.css, packages/react/src/components/Alert.tsx - Variants: `dv-alert--info`, `dv-alert--success`, `dv-alert--warning`, `dv-alert--error` ### HTML ```html

Information

This is an informational message.

Operation completed successfully.

``` ### React ```tsx This is an informational message. Something went wrong. Operation completed successfully. ``` ### Props ```ts variant?: 'info'|'success'|'warning'|'error' title?: ReactNode icon?: ReactNode hideIcon?: boolean iconBox?: boolean ``` ### Accessibility - Use role="alert" for important messages that need immediate attention (error/warning), role="status" for informational ones. An alert with no role is silent when inserted dynamically — the colour and icon carry the severity visually and nothing carries it to AT - An alert rendered in the initial page HTML needs no live-region role — reserve role="alert"/"status" for alerts inserted or revealed after load - Include descriptive icon with aria-hidden="true" ### Avoid - Combining multiple status variants (info, success, warning, error) - Alerts without icon or clear visual indicator --- ## alert-dialog Requests confirmation for a consequential action in a modal dialog. - Base class: `dv-alert-dialog` - React: `` - Element: `dialog` - Source: packages/html/src/css/components/_alert-dialog.css, packages/react/src/components/AlertDialog.tsx, packages/html/src/js/components/alert-dialog.js ### HTML ```html

Delete Item?

This action cannot be undone.

``` ### React ```tsx Delete Item? This action cannot be undone. Cancel Delete ``` ### Props ```ts open?: boolean defaultOpen?: boolean onOpenChange?: (open: boolean, details: DialogOpenChangeDetails) => void onCancel?: () => void onConfirm?: () => void | Promise onConfirmError?: (error: unknown) => void confirmationErrorMessage?: ReactNode children?: ReactNode ``` ### Events - `open` — Fired before the alert dialog opens (cancelable with preventDefault) - `opened` — Fired after the alert dialog has fully opened - `confirm` — Fired when the confirm action button is clicked - `cancel` — Fired when the user dismisses (Cancel button, Escape key, or backdrop click when closeOnBackdrop is enabled) - `close` — Fired before the alert dialog closes (cancelable with preventDefault) - `closed` — Fired after the alert dialog has fully closed ### Options - `closeOnBackdrop` (default: `false`) - `closeOnEscape` (default: `true`) - `restoreFocus` (default: `true`) ### Accessibility - Always render on a native with role="alertdialog", aria-labelledby (title), aria-describedby (message). Call .showModal() for focus trap and ::backdrop. Default focus to Cancel, never the destructive action. ### Avoid - Nesting .dv-alert-dialog inside .dv-dialog — they are parallel primitives, not a content block + shell. --- ## app Provides the application shell and content area around topbar and sidebar navigation. - Base class: `dv-app` - React: `` - Element: `div` - Source: packages/html/src/css/components/_app.css, packages/react/src/components/App.tsx - Modifiers: `dv-app--header-top`, `dv-app--inset` ### HTML ```html
...
Content
...
Content
...
Content
...
Content
...
Content
``` ### React ```tsx ... ... ... ``` ### Props ```ts layout?: 'default'|'header-top' inset?: boolean ``` --- ## avatar Represents a person or entity with an image, initials, or a fallback icon. - Base class: `dv-avatar` - React: `` - Element: `div|span` - Source: packages/html/src/css/components/_avatar.css, packages/react/src/components/Avatar.tsx - Variants: `dv-avatar--accent`, `dv-avatar--success`, `dv-avatar--info` - Sizes: `dv-avatar--xs`, `dv-avatar--sm`, `dv-avatar--md` (default), `dv-avatar--lg`, `dv-avatar--xl` ### HTML ```html
JD
AB
User name
A
B
+3
``` ### React ```tsx ``` ### Props ```ts size?: 'xs'|'sm'|'md'|'lg'|'xl' variant?: 'default'|'accent'|'success'|'info' src?: string alt?: string initials?: string name?: string ``` ### Accessibility - Images must have alt text; initials provide fallback - Avatar groups should have aria-label describing the group ### Avoid - Combining multiple color variants (accent, success, info) - Using images without alt text --- ## badge Labels status, counts, or categories with compact inline text. - Base class: `dv-badge` - React: `` - Element: `span|button` - Source: packages/html/src/css/components/_badge.css, packages/react/src/components/Badge.tsx - Variants: `dv-badge--neutral`, `dv-badge--success`, `dv-badge--warning`, `dv-badge--error`, `dv-badge--info`, `dv-badge--accent`, `dv-badge--solid-accent`, `dv-badge--solid-success`, `dv-badge--solid-warning`, `dv-badge--solid-error`, `dv-badge--interactive`, `dv-badge--removable` - Sizes: `dv-badge--sm`, `dv-badge--lg` - Modifiers: `dv-badge--multiline` ### HTML ```html Waiting for editorial approval Default Neutral (explicit) Accent Success Large Error Active Label Tag Operational ``` ### React ```tsx Waiting for editorial approval New Active }>Verified Tag ``` ### Props ```ts multiline?: boolean variant?: 'neutral'|'success'|'warning'|'error'|'info'|'accent'|'solid-accent'|'solid-success'|'solid-warning'|'solid-error' size?: 'sm'|'lg' dot?: boolean dotPulse?: boolean icon?: ReactNode removable?: boolean onRemove?: () => void interactive?: boolean render?: RenderProp ``` ### Accessibility - Removable badges MUST have remove button with aria-label - A status dot ACCOMPANIED by visible text ("* Active") is decorative — mark it aria-hidden="true" so the label is not read twice - A STANDALONE status dot is the only carrier of its meaning, so it must not be aria-hidden: give it role="img" + aria-label (or an adjacent .dv-sr-only span). The dot variants differ by hue alone — --active/--success, --pending/--warning and --inactive/--neutral are literally the same fill — so a bare dot with no name conveys nothing to AT and nothing to a colour-blind user either (WCAG 1.4.1). Prefer the dot + visible text form wherever the layout allows it - Count bubbles (`--count`) are decorative (aria-hidden); the count MUST be conveyed on the trigger instead, e.g. aria-label="Notifications, 3 unread" ### Avoid - Combining multiple status variants (success, warning, error) - Using solid- variants with other color variants --- ## banner Presents a page-level announcement with optional actions and dismissal. - Base class: `dv-banner` - React: `` - Element: `div` - Source: packages/html/src/css/components/_banner.css, packages/react/src/components/Banner.tsx, packages/html/src/js/components/banner.js - Variants: `dv-banner--info`, `dv-banner--success`, `dv-banner--warning`, `dv-banner--error`, `dv-banner--accent` - Modifiers: `dv-banner--sticky` ### HTML ```html

Scheduled maintenance tonight at 2:00 AM UTC.

Your trial ends in 3 days.

``` ### React ```tsx Scheduled maintenance tonight at 2:00 AM UTC. Upgrade}>Your trial ends in 3 days. ``` ### Props ```ts variant?: 'info'|'success'|'warning'|'error'|'accent' sticky?: boolean persistId?: string icon?: ReactNode action?: ReactNode dismissible?: boolean onDismiss?: () => void live?: boolean // announce through a separate primed status host; visible banner keeps role=region ``` ### Events - `dismiss` — Fired before the banner hides (cancelable with preventDefault) - `dismissed` — Fired after the banner has hidden ### Options - `persist` (default: `true`) ### Accessibility - A persistent system announcement uses role="region" with an aria-label; the dismiss button needs an aria-label. - React keeps the visible banner as a region and announces through a separate, initially empty status host. For custom HTML updates, prime an empty polite live region before inserting announcement text; do not rely on inserting a populated status element. ### Avoid - Combining multiple status variants on one banner. --- ## breadcrumb Shows the current page within a navigable hierarchy. - Base class: `dv-breadcrumb` - React: `` - Element: `nav` - Source: packages/html/src/css/components/_breadcrumb.css, packages/react/src/components/Breadcrumb.tsx ### HTML ```html ``` ### React ```tsx Home Products }>Widget Detail ``` ### Props ```ts children?: ReactNode maxItems?: number · itemsBeforeCollapse?: number · itemsAfterCollapse?: number // Breadcrumb.Item: href?: string · current?: boolean · render?: RenderProp ``` ### Accessibility - Use a