Alert
FREEBilgi, başarı, uyarı ve hata için sayfa içi mesaj; aksiyonlu ve kapatılabilir.
Kurulum
Terminal
npx @bloxa/cli add alert
# or: npx shadcn@latest add @bloxa/alertOtomatik kurulan paketler: motion
Örnekler
Türler
Heads up
Your trial ends in 3 days.
New version available
Bloxa 0.2 adds overlays and notifications.
Payment received
We emailed the receipt to [email protected].
Storage almost full
You are using 92% of your space.
Deployment failed
The build step exited with code 1.
Aksiyonlar, görünümler ve kapatma
Enable two-factor authentication
Protect your account with a code from your phone.
Domain connected
Scheduled maintenance on Sunday, 02:00–03:00.
API
Her bileşen, oluşturduğu HTML elemanının özelliklerini de kabul eder.
Alert
| Özellik | Tip | Varsayılan | Açıklama |
|---|---|---|---|
| variant | "default" | "info" | "success" | "warning" | "destructive" | "default" | Tür; renk ve ikonu belirler. |
| appearance | "soft" | "outline" | "accent-bar" | "soft" | Görünüm. |
| title | ReactNode | — | Başlık. |
| icon | ReactNode | false | — | Özel ikon ya da gizle. |
| actions | ReactNode | — | Düğmeler. |
| actionsInline | boolean | false | Düğmeleri sağa al. |
| dismissible | boolean | false | × ile kapanır, yumuşakça daralır. |
| onDismiss | () => void | — | Kapandıktan sonra. |