lightdarkdefaultcompact
Getting StartedInstallationChangelogSupportGithubIntegrationsAngularVueReactDemosFoundationThemesTypographyIconsPopoversInternationalizationDrag and DropKeyboard NavigationLayoutGetting StartedBlockInlineGridComponentsAccordionAlertAlert GroupAvatarBadgeBreadcrumbButtonButton CopyButton GroupButton ExpandButton HandleButton IconButton ResizeButton SortCardChatCheckboxColorData GridDateDialogDividerDrawerDropdownFileFormat BytesFormat DatetimeFormat NumberFormat Relative TimeFormat TokenFormsForm InteractionsForm ValidationHeaderInputMenuMonthNavNumberPagePaginationPanelPasswordPinProgress BarProgress CircleProgress DotRadioRangeRatingSearchSelectSkeletonStepperSwitchTabsTagTelephoneTextareaTimeToastToggletipTooltipTreeData GridGetting StartedFooterPlaceholderAsyncResponsiveHeightPaginationBordersHoverLayerRange SelectionCSVClipboardColumn AlignmentColumn WidthColumn FixedColumn StickyColumn VisibilityColumn GroupsColumn SpanColumn ResizeDraggable ColumnsDraggable RowsRow HeaderRow Multi SelectRow Single SelectRow HeightRow ActionRow Action BulkRow StickyRow StripeRow FixedRow SortRow Groups

The alert group component is used to inform users of important information or to provide feedback on an action they have taken.

Shows grouped alerts with various status types and closable functionality.

alert neutralalert accentalert successalert warningalert dangeralertalert
code
<script type="module">
  import '@blueprintui/components/include/alert.js';
</script>

<section bp-layout="block gap:sm">
  <bp-alert-group>
    <bp-alert closable>alert neutral</bp-alert>
  </bp-alert-group>
  <bp-alert-group status="accent">
    <bp-alert closable>alert accent</bp-alert>
  </bp-alert-group>
  <bp-alert-group status="success">
    <bp-alert closable>alert success</bp-alert>
  </bp-alert-group>
  <bp-alert-group status="warning">
    <bp-alert closable>alert warning</bp-alert>
  </bp-alert-group>
  <bp-alert-group status="danger">
    <bp-alert closable>alert danger</bp-alert>
  </bp-alert-group>

  <bp-alert-group>
    <bp-alert closable>alert</bp-alert>
    <bp-alert closable>alert</bp-alert>
  </bp-alert-group>
</section>

Alert Group Banner

Displays full-width banner alerts with links and closable functionality.

alert neutral read morealert accent read morealert success read morealert warning read morealert danger read more
code
<script type="module">
  import '@blueprintui/components/include/alert.js';
</script>

<section bp-layout="block gap:sm">
  <bp-alert-group type="banner">
    <bp-alert closable>alert neutral <a href="#" bp-text="link">read more</a></bp-alert>
  </bp-alert-group>
  <bp-alert-group type="banner" status="accent">
    <bp-alert closable>alert accent <a href="#" bp-text="link">read more</a></bp-alert>
  </bp-alert-group>
  <bp-alert-group type="banner" status="success">
    <bp-alert closable>alert success <a href="#" bp-text="link">read more</a></bp-alert>
  </bp-alert-group>
  <bp-alert-group type="banner" status="warning">
    <bp-alert closable>alert warning <a href="#" bp-text="link">read more</a></bp-alert>
  </bp-alert-group>
  <bp-alert-group type="banner" status="danger">
    <bp-alert closable>alert danger <a href="#" bp-text="link">read more</a></bp-alert>
  </bp-alert-group>
</section>

Install

NPM

// npm package
import '@blueprintui/components/include/alert.js';

CDN

<script type="module">
  import 'https://cdn.jsdelivr.net/npm/@blueprintui/components/include/alert.js/+esm';
</script>

Accessibility

  • Use clear, descriptive text for the alert message that communicates the purpose of the alert.
  • Use the appropriate alert status to indicate the severity of the alert.
  • Use aria-live attribute to indicate the importance and relevance of the alert message.
  • Provide an option for user to dismiss the alert, if applicable.
  • Avoid using the title attribute, as it is not read by screen readers.

bp-alert

Events

NameTypesDescription
close
open

Properties

NameTypesDescription
status'accent' | 'success' | 'warning' | 'danger'Defines the visual status type of the alert, affecting its color, icon, and semantic meaning
closablebooleanControls whether the alert displays a close button, allowing users to dismiss it
hiddenbooleanControls the visibility state of the alert, hiding it from view when set to true
i18nProvides internationalization strings for accessibility labels and screen reader announcements

Attributes

NameTypesDescription
status'accent' | 'success' | 'warning' | 'danger'Defines the visual status type of the alert, affecting its color, icon, and semantic meaning
closablebooleanControls whether the alert displays a close button, allowing users to dismiss it
hiddenbooleanControls the visibility state of the alert, hiding it from view when set to true
i18nProvides internationalization strings for accessibility labels and screen reader announcements

CSS Properties

NameTypesDescription
--icon-color
--color

Slots

NameTypesDescription
defaultslot for content

bp-alert-group

Properties

NameTypesDescription
status'accent' | 'success' | 'warning' | 'danger'determine the visual status state
type'banner'determine the visual styles for top/pinned banners

Attributes

NameTypesDescription
status'accent' | 'success' | 'warning' | 'danger'determine the visual status state
type'banner'determine the visual styles for top/pinned banners

CSS Properties

NameTypesDescription
--background
--color
--padding
--border-radius

Slots

NameTypesDescription
defaultslot for content