Skip to content

Alert

Alert is a helm-native component: it implements its own presentation directly, with no Navius primitive underneath. The root renders role="alert" and layers a Variant-driven Tailwind class set; ZitsAlertTitle and ZitsAlertDescription are plain typographic slots for the heading and body text.

Terminal window
navius add alert --to ./src/MyApp --namespace MyApp.Ui
@using Zits.Ui.Components
<ZitsAlert Variant="destructive">
<ZitsAlertTitle>Heads up</ZitsAlertTitle>
<ZitsAlertDescription>Something needs your attention.</ZitsAlertDescription>
</ZitsAlert>

ChildContent and Attributes pass through unchanged on all three parts. ZitsAlert adds:

Prop Type Default Description
Variant string "default" One of default, destructive. Selects the Tailwind class set.

ZitsAlertTitle and ZitsAlertDescription take no variant/size params of their own.

Attributes on all three parts is forwarded to the rendered element and merged with the Variant class set (on the root) via Cn.Class, with the caller’s classes applied last.

Parameter Values
Variant default · destructive

The root renders native role="alert", which assistive tech announces as a live region when the element is inserted into the DOM. No data-* state hooks are emitted; the component carries no other ARIA wiring.