Swirski UI

Feedback

Alert

A loud composable feedback block for announcements, errors and status messages.

Component

02

Request Changes

Import

import { Alert, AlertTitle, AlertDescription } from "@swirski/ui";

Playground

3 controls

Heads up

New components are ready to try in your next interface.

Controls

Usage

<Alert tone="yellow">
  <AlertTitle>Heads up</AlertTitle>
  <AlertDescription>
    New components are ready to try in your next interface.
  </AlertDescription>
</Alert>

Props

10 generated
PropTypeDefaultNotes
Alert.asChildbooleanfalseGenerated from AlertProps.
Alert.size'sm' | 'md' | 'lg'"md"Generated from AlertProps.
Alert.tone'blue' | 'yellow' | 'red' | 'white'"yellow"Applies the alert surface color.
Alert.variant'solid' | 'outline' | 'soft'"solid"Generated from AlertProps.
AlertDescription.size'sm' | 'md' | 'lg'"md"Generated from AlertDescriptionProps.
AlertDescription.tone'default'"default"Applies the alert surface color.
AlertDescription.variant'default'"default"Generated from AlertDescriptionProps.
AlertTitle.size'sm' | 'md' | 'lg'"md"Generated from AlertTitleProps.
AlertTitle.tone'default'"default"Applies the alert surface color.
AlertTitle.variant'default'"default"Generated from AlertTitleProps.
childrenRequiredReactNode-Alert content, usually AlertTitle and AlertDescription.
roleAriaRole"status"Accessible live-region role for the alert container.
classNamestring-Adds classes to the root alert.
AlertTitle.classNamestring-Adds classes to the title heading.
AlertDescription.classNamestring-Adds classes to the description paragraph.
Previous: BadgeNext: Button