Skip to content
aq-ui
Back to ComponentsComponent

Alert

Open-code aq-ui accessible component family for Alert.

Preview

This is a live example. Interact with the available controls and use the keyboard to inspect the component's states and behavior.

Loading interactive preview…

Installation

pnpm dlx aq-ui@alpha add alert

API reference

SSR-safe

Import the parts you need, then jump to an export for its contract.

View full source

Quick start

import { Alert } from "@/components/ui/alert"

<Alert />

Alert

constSource L22

Open-code aq-ui accessible component family for Alert.

const Alert = React.forwardRef<React.ComponentRef<"div">, React.ComponentProps<"div"> & VariantProps<typeof alertVariants>>(…)
Props type
React.ComponentProps<"div"> & VariantProps<typeof alertVariants>
<Alert />

AlertAction

constSource L74

Action export for composing Alert.

const AlertAction = React.forwardRef<React.ComponentRef<"div">, React.ComponentProps<"div">>(…)
Props type
React.ComponentProps<"div">
<AlertAction />

AlertDescription

constSource L56

Description export for composing Alert.

const AlertDescription = React.forwardRef<React.ComponentRef<"div">, React.ComponentProps<"div">>(…)
Props type
React.ComponentProps<"div">
<AlertDescription />

AlertTitle

constSource L38

Title export for composing Alert.

const AlertTitle = React.forwardRef<React.ComponentRef<"div">, React.ComponentProps<"div">>(…)
Props type
React.ComponentProps<"div">
<AlertTitle />

Registry dependencies

utils

Package dependencies

class-variance-authority@^0.7.1

Files

  • components/ui/alert.tsx

Source