Components
Every public export has a page with parameters and defaults, supported methods and overrides, usage and accessibility. Import from @dg/ui; the source categories are organizational, not package entry points.
01Structure
Analytics— measures page views and declared events, on by default, and provides the privacy dialog where visitors turn statistics off.Footer— places an identity and notice at the end of the page, wrapping and stacking on small screens, with the privacy control when statistics are configured.Grid— arranges direct children in equal-width columns and equal-height rows, with optional internal dividers and height growth.Header— combines the application identity, an optional app name and responsive navigation with a shared theme switch.Heading— composes a framed editorial title, an optional section number and optional metadata with extra space above the title.Main— groups route sections in a growing column and coordinates adjoining frame rules and crosses.Page— centers the application frame, supplies responsive margins and fills at least the viewport height.Section— owns a framed content block, its corner crosses, outer padding and spacing between direct children.SectionHead— supplies a compact numbered heading with optional metadata and a trailing action.
Button— triggers an action or opens a destination, with shared variants, keyboard behavior and disabled states.Dialog— opens a native modal panel, drawer, full-screen sheet or media view with a titled bar, a close button and a blurred backdrop.IconButton— places a decorative thin-stroke icon inside an accessible button target.SkipLink— provides a keyboard shortcut to the main content before the application navigation.Tabs— shows one panel at a time within the page, selected from a keyboard-accessible row of tabs.ThemeToggle— switches the shared document between light and dark themes and synchronizes the saved preference.
Card— presents a title and content as an article or a whole-card link, with optional media, metadata and footer snippets.Cards— arrangesCardchildren in a numbered horizontal collection with scrolling controls when the track overflows.ErrorPage— displays a framed status, explanation and recovery link using built-in English or French copy.Quote— presents escaped quotation text as paragraphs with an optional attribution.
04Conversation
ChatComposer— provides a labeled, growing textarea and sends trimmed nonempty text through a callback.ChatMessage— presents a speaker label, message body and optional source as a user or assistant message.ChatPanel— supplies the growing flex-column body shared by inline and floating conversations.ChatSuggestions— presents suggested prompts as native buttons and sends the selected string to the parent.ChatThread— provides a focusable scrolling region containing a polite live message log and optional notice.ChatWindow— owns a launcher and a conversation dialog that can switch between floating and modal fullscreen layouts.