A generic alert component with different type variation and close option.'

Variations

  • --danger: by default, it gets red accents.
  • --info: by default, it gets blue accents.
  • --success: by default, it gets green accents.
  • --warning: by default, it gets yellow accents.

Technical Details

  • You should use the ARIA alert role on your alert elements to convey more meaning.
  • If you need a closing functionality for the UI, you can use the .alert__close element, but you need to implement the closing functionality yourself.