tuil
ReferenceComponentsFeedback

Alert

Alert component API, behavior, and executable example.

View rawEdit

Loading executable example…

API and events

Communicate messages, completion, and pending work with theme tokens and reduced-motion behavior.

export function Alert({
  tone = "info",
  title,
  children,
  slots,
  slotProps,
  unstyled,
  ...props
}: AlertProps): ReactNode;

Props, functions, and events

MemberTypeRequiredDescriptionRelated types
idstring | undefinedNoThe id member uses the string | undefined contract.
testIdstring | undefinedNoThe testId member uses the string | undefined contract.
labelstring | undefinedNoThe label member uses the string | undefined contract.
descriptionstring | undefinedNoThe description member uses the string | undefined contract.
disabledboolean | undefinedNoThe disabled member uses the boolean | undefined contract.
readOnlyboolean | undefinedNoThe readOnly member uses the boolean | undefined contract.
toneTone | undefinedNoThe tone member uses the Tone | undefined contract.
titlestring | undefinedNoThe title member uses the string | undefined contract.
childrenReactNodeNoThe children member uses the ReactNode contract.
slotsPartial<SlotComponents<&#123; root: import("../../../registry/primitives/box").BoxProps; icon: import("../../../registry/data-display/text").TextProps; title: import("../../../registry/data-display/text").TextProps; content: import("../../../registry/data-display/text").TextProps; &#125;>> | undefinedNoThe slots member uses the Partial<SlotComponents<&#123; root: import("../../../registry/primitives/box").BoxProps; icon: import("../../../registry/data-display/text").TextProps; title: import("../../../registry/data-display/text").TextProps; content: import("../../../registry/data-display/text").TextProps; &#125;>> | undefined contract.BoxProps, SlotComponents, TextProps
slotPropsPartial<SlotProps<&#123; root: import("../../../registry/primitives/box").BoxProps; icon: import("../../../registry/data-display/text").TextProps; title: import("../../../registry/data-display/text").TextProps; content: import("../../../registry/data-display/text").TextProps; &#125;, &#123; readonly tone: "info" | "success" | "warning" | "danger"; &#125;>> | undefinedNoThe slotProps member uses the Partial<SlotProps<&#123; root: import("../../../registry/primitives/box").BoxProps; icon: import("../../../registry/data-display/text").TextProps; title: import("../../../registry/data-display/text").TextProps; content: import("../../../registry/data-display/text").TextProps; &#125;, &#123; readonly tone: "info" | "success" | "warning" | "danger"; &#125;>> | undefined contract.BoxProps, SlotProps, TextProps
unstyledboolean | undefinedNoThe unstyled member uses the boolean | undefined contract.
variantstring | undefinedNoThe variant member uses the string | undefined contract.
size"sm" | "md" | "lg" | undefinedNoThe size member uses the "sm" | "md" | "lg" | undefined contract.

No events are emitted.

Callback props run after the documented input is accepted. Callbacks are not cancellable unless their return type or description states otherwise.

Interaction and capabilities

Read-only; update props as application state changes.

The published manifest records keyboard, focus, pointer, theme, terminal, semantic, event, and dependency requirements.

Complete import

import { Alert } from "@/components/tuil/feedback/alert";

On this page