Toast
Всплывающие уведомления. Бесплатно, MIT · Окна и уведомления › Сообщения и статус
Установка
npx valyro-cli@latest add toast
npx shadcn@latest add https://valyro.xyz/r/toast.json
npm install valyro-ui
import 'valyro-ui/styles.css';
import { Toaster, toast } from 'valyro-ui';
Пропсы
| Prop | Type | Default | |
|---|---|---|---|
position | 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right' | 'bottom-right' | Viewport corner or edge the stack sits at; new toasts enter from that edge. On phones (≤ 600px) it spans the width. |
visibleToasts | number | 3 | Toasts beyond this count wait (hidden, timers paused) behind the stack. |
richColors | boolean | false | Tint success / error / warning / info toasts with their status color. |
closeLabel | string | 'Close notification' | Accessible name of each toast's close button. |
Похожие компоненты
- Alert — Предупреждения
- Notification Center — Центр уведомлений
- Loading Overlay — Экран загрузки
- Dialog — Модальные окна
- Confirm Dialog — Подтверждение действий
- Drawer — Выдвижные панели
- Bottom Sheet — Нижняя шторка в стиле iOS: точки остановки, свайп, режим «подглядывания»
- Popover — Всплывающий контент
- Hover Card — Карточка при наведении
- Tour — Онбординг-тур: подсветка элементов, шаги, прогресс и возобновление
Назад: Alert · Далее: Notification Center · Весь раздел «Окна и уведомления»