Skip to Content

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"infoSemantic status. Does not automatically select a live-region role.
childrenReactNode—Main message; accepts inline or composed content.
endReactNode—Trailing action or content. A separator appears only alongside close.
closablebooleanShows the close ActionButton.
closeLabelstringЗакрыть уведомлениеAccessible name of the close button.
onClose() => void—Requests dismissal; the owner controls visibility and focus after removal.
Last updated on