Brand
Changelog v1.4

Brand Alert

<brand-alert> wraps Shoelace's <sl-alert>. Use the variant attribute for semantic colouring.

Variants

Informational message. Your changes have been saved. Check the details before proceeding. Something went wrong. Please try again. System notice.

Fill (solid)

Informational message. Saved. Check the details. Something went wrong.

Soft (pale tint)

Informational message. Saved. Check the details. Something went wrong.

Closable

This alert can be dismissed.

Usage

import { BrandAlert } from '@brandos/ui';

<brand-alert variant="success" open>
  <sl-icon slot="icon" name="check2-circle"></sl-icon>
  Saved.
</brand-alert>

// JS — toast notification
const alert = document.createElement('brand-alert');
alert.setAttribute('variant', 'success');
alert.textContent = 'Saved!';
alert.toast();