Alert

사용자에게 중요한 정보나 피드백을 표시하는 알림 컴포넌트입니다.

Installation

bash
npx axis-cli add alert

Usage

tsx
import { Alert, AlertTitle, AlertDescription } from '@axis-ds/ui-react'

export function Example() {
  return (
    <Alert>
      <AlertTitle>Heads up!</AlertTitle>
      <AlertDescription>
        You can add components to your app using the cli.
      </AlertDescription>
    </Alert>
  )
}

Default

Variants

tsx
<Alert variant="info">
  <Info className="h-4 w-4" />
  <AlertTitle>Information</AlertTitle>
  <AlertDescription>This is an informational message.</AlertDescription>
</Alert>

<Alert variant="success">
  <CheckCircle className="h-4 w-4" />
  <AlertTitle>Success</AlertTitle>
  <AlertDescription>Your changes have been saved.</AlertDescription>
</Alert>

<Alert variant="warning">
  <AlertTriangle className="h-4 w-4" />
  <AlertTitle>Warning</AlertTitle>
  <AlertDescription>Please review before continuing.</AlertDescription>
</Alert>

<Alert variant="destructive">
  <AlertCircle className="h-4 w-4" />
  <AlertTitle>Error</AlertTitle>
  <AlertDescription>Something went wrong.</AlertDescription>
</Alert>

Props

variant
Type:"default" | "info" | "success" | "warning" | "destructive"
Default:"default"

Alert 스타일 변형

className
Type:string
Default:-

추가 CSS 클래스