Alert
Встроенное сообщение с семантическим статусом, содержимым и действиями. Link, Divider и ActionButton используются через готовые компоненты.
Использование
You can swap «children»
Статусы
You can swap «children»
You can swap «children»
You can swap «children»
You can swap «children»
Состояния
You can swap «children»
Доступность
Статическое сообщение не получает live-role автоматически. Для динамического сообщения передайте role=“status” или role=“alert” по срочности. Декоративная иконка скрыта; закрытие — нативная кнопка. onClose не размонтирует Alert: видимость и логичный фокус после удаления контролирует владелец. Escape и таймер не закрывают сообщение автоматически. HTML-атрибуты и ref относятся к корню div.
API
| Проп | Тип | По умолчанию | Описание |
|---|---|---|---|
status | "info" | "success" | "warning" | "error" | info | Semantic status. Does not automatically select a live-region role. |
children | ReactNode | — | Main message; accepts inline or composed content. |
end | ReactNode | — | Trailing action or content. A separator appears only alongside close. |
closable | boolean | | Shows the close ActionButton. |
closeLabel | string | Закрыть уведомление | Accessible name of the close button. |
onClose | () => void | — | Requests dismissal; the owner controls visibility and focus after removal. |
Last updated on