Retour v1.0.0

Bannière

Barre d'annonce persistante pour les messages importants, les promotions ou les avertissements. Prend en charge la fermeture avec persistance localStorage, les boutons d'action et plusieurs variantes. Peut être fixée en haut ou en bas de la fenêtre, ou rendue en ligne dans le flux du document.

Aperçu et code

Options

Nom Type Par défaut Description
message * String requis The banner message text
variant Symbol :info Visual style: :info, :success, :warning, or :error
dismissible Boolean false Whether the banner can be dismissed
persist_dismiss Boolean false Remember dismissal via localStorage (requires dismiss_key)
dismiss_key String nil localStorage key for persistent dismissal
action_text String nil Text for the action button/link
action_url String nil URL for the action button
position Symbol :top Banner position: :top, :bottom, or :inline
icon Boolean true Show the variant icon

Journal des modifications v1.0.0

- Initial release with info, success, warning, and error variants
- Fixed top/bottom positioning and inline rendering mode
- Dismissible with optional localStorage persistence
- Optional action button/link with arrow icon
- Variant-specific icons and color schemes with dark mode support

Obtenir l'accès complet

Débloquez le code source de ce composant et de tous les autres. Paiement unique pour un accès à vie.

Obtenir l'accès maintenant