Alert
Предупреждения. Бесплатно, MIT · Окна и уведомления › Сообщения и статус
Установка
npx valyro-cli@latest add alert
npx shadcn@latest add https://valyro.xyz/r/alert.json
npm install valyro-ui
import 'valyro-ui/styles.css';
import { Alert } from 'valyro-ui';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
variant | 'info' | 'success' | 'warning' | 'danger' | 'neutral' | 'info' | Status color and default icon; warning and danger are announced immediately (role="alert"). |
title | ReactNode | Bold first line of the message. | |
description | ReactNode | Body text under the title, or the whole message when there is no title. | |
icon | ReactNode | Replaces the variant's default icon; null hides it. | |
action | ReactNode | Buttons or links shown at the end of the alert. | |
onDismiss | () => void | Shows a close button that calls this. | |
dismissLabel | string | 'Dismiss' | Accessible name of the close button. |
Составные части
Alert.Title (AlertTitle), Alert.Description (AlertDescription), Alert.Action (AlertAction)
Похожие компоненты
- Toast — Всплывающие уведомления
- Notification Center — Центр уведомлений
- Loading Overlay — Экран загрузки
- Dialog — Модальные окна
- Confirm Dialog — Подтверждение действий
- Drawer — Выдвижные панели
- Bottom Sheet — Нижняя шторка в стиле iOS: точки остановки, свайп, режим «подглядывания»
- Popover — Всплывающий контент
- Hover Card — Карточка при наведении
- Tour — Онбординг-тур: подсветка элементов, шаги, прогресс и возобновление
Назад: Keyboard Map Overlay · Далее: Toast · Весь раздел «Окна и уведомления»