Components
This page catalogs every component that @ada-cx/lovelace exports, grouped by role. Each entry names the component’s purpose and its most important props, and pairs them with a copyable example. Prop types ship with the package as TypeScript declarations, so your editor completes and checks every prop.
Live component gallery
Every component in this catalog renders live below, including each icon glyph. The gallery follows the theme you configure in the theme playground: pick a preset or a scheme on either page, and both pages stay in sync. Overlay components, such as DialogOverlay and SheetOverlay, open from a button inside a contained preview frame in their tile.
The live component gallery could not load in this view. The catalog below describes every component.
Shared conventions
All components follow the same contract:
- Every component accepts
classNameandstyle, and takesrefas a regular prop (React 19). - Interactive components extend the matching React Aria Components props. Use
onPressinstead ofonClick, andisDisabledinstead ofdisabled. - Interactive states render as
data-*attributes:data-hovered,data-pressed,data-focus-visible,data-disabled,data-selected. Extend styling by targeting those attributes, not pseudo-classes. - Compound components attach their parts with dot notation, for example
Input.FieldandDialog.Title. The parts are not separate exports. - Icon-only controls require a
labelprop. It becomes the accessible name.
Conversation
Components that render the conversation itself. The chat composer is not a separate export: it is the Input component’s "composer" variant, with a send Input.Button — see Input.
MessageRow
One row of a transcript: an optional avatar gutter, then MessageRow.Content, the column that holds everything belonging to the message. Key props: sender on the row, fill on MessageRow.Content.
sender sets which edge the row aligns to and the typography the column carries. The row imposes no message body. A row that shows prose renders AgentMessage or UserMessage inside the column. A row that shows a card, a widget or media renders neither, and still reads at message size. Set fill when the content supplies no width of its own.
Keep the avatar a sibling of the column rather than a child of it. A reaction bar or a retry control beside the message then aligns with the message text.
AgentMessage
A single agent message body. The content accepts blocks, such as lists and tables. Key props: children.
Row layout is yours, not the component’s. Place an avatar, a sender name or a retry control beside the body rather than inside it, so they align with the text and stay outside the body’s own text-direction detection. MessageRow supplies that layout. Use <Avatar showAvatar={false}> to hold the gutter on a grouped message that shows no avatar.
UserMessage
The end user’s outbound message bubble, shrink-wrapped to its content. The content accepts blocks, such as lists and tables. Key props: children.
Where the bubble sits is yours: align it to the trailing edge in your own row. Render MessageError beside the bubble when a send fails.
MessageError
The failed-to-send row shown below a message bubble. With onRetry the copy becomes a retry control and names it. Without onRetry the copy renders as static text. Key props: children, onRetry, announce.
The row announces the failure through a visually-hidden role="alert". Set announce to false on a surface that announces message failures through its own live region. Two live regions announce the same text twice.
Without onRetry, the row hides the visible copy from assistive technology while announce stays on. The alert already carries that text. With onRetry, the copy stays exposed, because it names the retry control.
The row also aligns at the leading edge of its container. Put it in an end-aligned column to keep it below the bubble.
PictureMessage
An image message frame with a built-in “image unavailable” placeholder. Key props: src, alt, aspectRatio ("16:9" | "4:3" | "1:1" | "3:4" | "9:16"), unavailable, onLoadingStatusChange.
ProactiveMessage
A proactive greeting card shown outside the conversation window. Key props: children.
Divider
A transcript separator: a plain rule, a labeled marker (for example “1 unread message”), or a centered system message. Key props: variant ("line" | "label" | "message"), heading, children.
ScrollMarker
A floating jump-to-bottom control; shows an unread pill when messages wait below the fold. Key props: unreadCount, color ("default" | "brand"), onPress, children.
Header
The conversation header bar. Compound: Header.Title.
Actions
Buttons and links that trigger an action.
Button
The standard action button. Key props: variant ("primary" | "secondary" | "tertiary"), size ("md" | "sm"), destructive, onPress, isDisabled.
IconButton
An icon-only button. Key props: label (required), variant ("primary" | "secondary" | "tertiary"), size ("md" | "sm" | "xs"), destructive, children (a single icon).
PillButton
A pill-shaped secondary action button. Key props: size ("md" | "sm"), onPress, isDisabled.
Link
An inline text link, with optional external-link icon and download semantics. Key props: href, underlined, showIcon, download.
Forms and selection
Form and selection controls, including the chat composer.
Input
The text field and chat composer. Compound: Input.Label, Input.Field, Input.Attachments (chip row inside the field, above the control), Input.Control (single line), Input.TextArea (auto-growing multi-line), Input.HelperText, Input.Button. Key props — root: variant ("default" | "composer"), value, onChange, isDisabled, isInvalid; Input.TextArea: minRows, maxRows.
The composer variant adds the send button and an auto-growing text area:
Input.Attachments holds attachment chips inside the field, in either variant. Render it as the first child of Input.Field. It takes a full line above the control, and the send button stays on the control’s line:
Input.Field sets flex-wrap: wrap in both variants to allow this. A child that cannot shrink moves to a new line at a narrow width instead of overflowing.
Checkbox
A checkbox with an optional inline label. Key props: isSelected, onChange, children.
CheckboxGroup
CheckboxGroup groups Checkbox options and owns the selected values. Key props: aria-label, children, onChange, value.
Radio and RadioGroup
RadioGroup groups Radio options with keyboard navigation. Key props — RadioGroup: value, onChange, aria-label, children; Radio: value, children.
Toggle
An on/off switch. Track-only: name it with aria-label. Key props: isSelected, onChange, aria-label.
Chip
A toggle chip for quick replies and filters. Key props: variant ("text" | "icon" | "number"), size ("md" | "lg"), isSelected, onChange, children.
SurveyRating
A numeric or icon rating scale (for example CSAT 1 to 5). Provide aria-label, or use aria-labelledby to reference the visible question label. Key props: aria-label, aria-labelledby, onChange, options, selectedKey, showLabels.
SurveySelect
A chip group for single or multiple choice survey questions. Provide aria-label, or use aria-labelledby to reference the visible question label. Key props: aria-label, aria-labelledby, disallowEmptySelection, onChange, options, selectedKeys, selectionMode ("single" | "multiple").
Feedback and status
Components that report what the system is doing.
Banner
The tinted full-width strip that reports a condition, such as an outage, a lost connection, or a failed send. It carries no control, because only the state that raised the condition takes the banner down. It is presentational and owns no live region, so it announces nothing on its own. Put it in a BannerContainer. Key props: status ("success" | "warning" | "error"), children.
BannerContainer
Announces and animates one Banner. It owns the live region and mounts it empty, so a banner that arrives is a change the screen reader reports. error interrupts as an assertive alert. Any other status waits its turn as a polite status. The container clips the banner’s travel, so you need no overflow rule of your own. Mount it for as long as the surface exists. It never queues and never times out, and it holds one banner at a time, so pick the condition to show before you hand it over. Key props: children, occurrence.
Change occurrence whenever the reader must hear the banner again: the same condition raised a second time with the same wording, a different condition taking the slot, or a change of status. A change hides the live region for a frame and reveals it, which is what makes wording the reader has already heard read out again. Leave it alone to reword the banner, and the live region reports the new text on its own.
Spinner
A loading spinner for inline or region loading states. Key props: size ("sm" | "lg"), background ("default" | "accent"), label.
ThinkingShimmer
An animated shimmer label shown while the AI Agent generates a reply. Key props: label.
Toast
The floating card that ToastContainer renders. It sits above the transcript on a neutral background, so a passing event does not look like the tinted strip a lasting condition uses. It carries no live region of its own, so it announces nothing when you render it alone. Use it directly only inside a container that owns the announcement. Key props: children, dismissDisabled, dismissLabel, icon, messageProps, onDismiss, status ("success" | "warning" | "error" | "custom" | "loading").
Set icon to supply the glyph for status="custom". The loading status shows a spinner and renders no dismiss button.
ToastContainer
Shows the toasts on a queue as a labelled landmark region. The container owns announcement, the card surface, and the motion. It names the dismiss button in the reader’s own language. It keeps the region reachable with F6. The container shows no toast while a modal overlay is open, and shows the queue again after the overlay closes. Create one queue for each surface.
You own the clock. Decide which toasts exist, how long each one lives, and what a dismiss press means. Put a key in exiting to start that card’s travel off the stack, and keep the card on the queue until onExited reports it. Key props: aria-label, exiting, onDismiss, onExited, queue.
Hold your countdowns for two cases the reader cannot read through. A modal overlay hides the stack, so a countdown that runs on expires a card the reader never saw. The useHasOpenOverlay hook reports whether one is open. Keyboard focus inside the stack is the reader asking for more time, which is the only extension a card that dismisses itself offers. Listen for focusin and focusout on the container, and hold for as long as focus stays. The example below holds for the overlay; hold for focus the same way.
Each queue entry takes { message, status?, icon? }. The status accepts "success", "warning", "error", "custom", and "loading", and defaults to "success". Set icon to supply the glyph for status: "custom". A loading toast renders no dismiss button, so close or replace it from the code that queued it.
TypingIndicator
An animated three-dot bubble shown while a human agent types. Use ThinkingShimmer for AI generation instead. Key props: aria-label, aria-live.
Overlays and menus
Modal and floating surfaces. The overlay components own presentation (scrim, focus trap, dismissal); the content components own layout.
BubbleOverlay
A non-dimming modal bubble near the bottom edge; the chat behind it stays visible. Key props: isOpen, onOpenChange, isDismissable, aria-label.
DialogOverlay
A centered modal dialog presentation with a scrim. Key props: isOpen, onOpenChange, isDismissable, role ("dialog" | "alertdialog").
FullscreenOverlay
A modal surface that fills the window. Key props: isOpen, onOpenChange, isDismissable.
SheetOverlay
A dimming, slide-up modal bottom-sheet presentation. Key props: isOpen, onOpenChange, isDismissable, aria-label.
Dialog
Dialog content: icon, title, body, and action buttons. Compound: Dialog.Icon, Dialog.Content, Dialog.Title, Dialog.Body, Dialog.Actions. Wrap in DialogOverlay for the modal presentation.
Sheet
Bottom-sheet content. Compound: Sheet.Header, Sheet.Body, Sheet.Actions. Wrap in SheetOverlay for the modal presentation.
Menu and MenuItem
Menu is a role="menu" collection with arrow-key navigation and typeahead; MenuItem is one row (compound: MenuItem.Label, plus MenuItem.Checkbox / MenuItem.Radio / MenuItem.Toggle for a selection indicator). Row content is ordered by child position around the label. Key props — Menu: aria-label, onAction, children; MenuItem: children.
Tooltip and TooltipTrigger
Tooltip is an inverse-surface tooltip with a directional arrow; TooltipTrigger (re-exported from React Aria Components) associates it with a focusable trigger. Key props — Tooltip: placement ("top" | "bottom" | "left" | "right"), children; TooltipTrigger: delay, children.
Primitives
Low-level building blocks the other components compose.
Avatar
A circular avatar bubble holding initials, an Icon, or an Image. Key props: size ("sm" | "md" | "lg" | "xl"), label (or aria-hidden), showAvatar, children.
AvatarPlaceholder
An empty avatar bubble for loading or anonymous states. Key props: size.
Icon
Wraps one icon glyph and standardizes its size and accessible name. Key props: label, children.
Image
An image with load-state tracking and a fallback slot. Key props: src, alt (required), fallback, onLoadingStatusChange.
Icon glyphs
The package also exports a set of ready-made glyph components, including ArrowDown, Checkmark, ChevronLeft, CloudUpload, Email, Paperclip, SendFill, ThumbsDown, and ThumbsUp. Each glyph wraps itself for correct sizing, so you can pass one directly wherever a component asks for an icon:
The full glyph list is in the package’s TypeScript declarations, and every glyph renders in the live component gallery.