GitHub

Callout

Dismissable alert with variants, auto-dismiss timer, and custom icons.

<rhx-callout>

Examples

Variants

Closable

Auto-dismiss

Custom Icon

htmx Integration

Properties

Property Type Default Description
rhx-variant string neutral Color variant: neutral, brand, success, warning, danger
rhx-closable bool false Show a close/dismiss button
rhx-duration int? - Auto-dismiss after N milliseconds
rhx-icon string - Override the default icon for the variant
rhx-open bool true Whether the callout is visible

Accessibility

  • Uses role="alert" for important messages that need immediate screen reader announcement.
  • Close button has aria-label="Close" for screen readers.
  • Auto-dismiss respects prefers-reduced-motion to avoid unexpected content removal.
  • Color is not used as the sole indicator of variant meaning; icons provide additional context.