Overview
Callout combines title, description, icon, and action nodes. Use status for neutral, info, success, warning, or error. It defaults to info and supports the soft appearance. The status selects a gray, blue, green, orange, or red palette; color overrides that palette without changing the meaning.
Usage
Visual options
Compare semantic statuses using the same content. Choose a status for the message meaning, and override color only when the surrounding design requires it.Dismissible notice
Dismissal and labels
PassingonDismiss exposes an accessible close button. Each pointer or keyboard activation calls it once. The callout remains rendered until its caller hides it. Omit onDismiss for a persistent message. closeLabel defaults to Close.
Your application owns the content, actions, accessible names, and translations. Use Callout.Action for a small ghost button with regular font weight. It accepts Button props, including link attributes, disabled state, refs, and custom rendering; size and appearance are fixed. The action slot also accepts custom buttons, links, disabled controls, or multiple nodes. The default help icon is decorative; pass icon={null} to omit it or supply a node with appropriate accessible semantics. Twenty UI does not require an i18n provider.
Native integration
Native attributes,className, style, and ref target the root div. Use render to compose a different root element or a callback receiving the root props and { status, variant, color }. title and description are content slots. fullWidth removes the default 512px maximum width.
The component adds no live-region role or announcements. Supply native role, aria-live, and other accessible attributes when the surrounding workflow requires them.
Migration
Replace the previous semanticvariant with status, and constructor Icon with an icon node. Replace { label, onClick } action objects with Callout.Action or custom controls. Replace isClosable and onClose with onDismiss, and conditionally render the callout in the caller when dismissal should hide it. Existing translated content and action labels stay in the application.
Props
Optional footer node. Use Callout.Action for the standard action or supply custom controls.
Palette override: gray, blue, green, orange, or red. Defaults to the status palette.
Leading icon node. Defaults to a decorative help icon. Pass null to omit it.
Shows a dismiss button and notifies the caller once per activation. The caller owns visibility.
ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, CalloutState>
Element or callback composition for the root. Receives status, variant, and color state.
Feedback meaning: neutral, info, success, warning, or error. Defaults to info.
Callout.Action
CSS class applied to the element, or a function that
returns a class based on the component’s state.
Semantic color of the button.
inherit uses the surrounding text color for the label, icons, loader, and outline border, with translucent black interaction surfaces. It supports outline, ghost, soft, and link. Resolving solid with inherit throws, including appearance inherited from ButtonGroup and wrapper defaults.Destination URL. Renders a native anchor when
render is omitted unless nativeButton is explicitly true. Custom renderers retain their own element contract.Where the loading indicator appears.
center hides the content while preserving its layout space; start and end keep children and the opposite icon visible and replace the corresponding icon with the spinner.Whether the rendered root is a native button. Defaults to true for custom renderers. The built-in
href anchor defaults to false; an explicit value takes precedence.ReactElement<unknown, string | JSXElementConstructor<any>> | ComponentRenderFn<HTMLProps, ButtonState>
Caller-supplied root element or renderer. Native attributes, handlers, event details, and refs reach the rendered root. Use
nativeButton={false} and role="link" for a custom navigation anchor. Router integration belongs to the caller.Flat key array for simultaneous keys, or nested key arrays for an ordered sequence. Displayed on non-mobile screens.