Skip to content

Notice

The notice components.

  • Import
    import "@tapsioss/web-components/notice";
  • Tag
    <tapsi-notice></tapsi-notice>

Properties

NameDescriptionTypeDefault Value
visibleIndicates whether the notice is visible or not.booleanfalse
headingThe title of the notice.string-
descriptionThe description of the notice.string-
colorThe color of the notice, indicating the type of message. Defaults to info."success" | "error" | "info" | "warning""info"
priorityThe priority level of the notice. Defaults to high. High priority uses bolder colors and the role of alert for screen readers, while low priority uses lighter colors and the role of status."high" | "low""high"
artworkThe artwork of the notice component. Defaults to icon. Setting to none hides the artwork. The icon value shows a default icon based on the color, and custom enables the use of the artwork slot."none" | "icon" | "custom""icon"
variantThe variant of the notice. Defaults to standard."standard" | "compact""standard"
dismissibleIndicates whether the notice can be dismissed.booleanfalse

Slots

NameDescription
actionsThe actions associated with the notice component, typically a collection of tapsi-button components.
artworkThe custom artwork slot for the notice component. To display this slot, set the artwork property to custom.

TIP

You can use slot names as variables:

ts
import { Slots } from "@tapsioss/web-components/notice";

console.log(Slots.ACTIONS); // "actions"
console.log(Slots.ARTWORK); // "artwork"

Events

NameDescriptionType
showFires when the tooltip should be visible.ShowEvent
hideFires when the tooltip should be hidden.HideEvent

TIP

You can import custom event names:

ts
import { 
  ShowEvent,
  HideEvent
} from "@tapsioss/web-components/notice";

element.addEventListener(ShowEvent.type, handleTapsiNoticeShow);
element.addEventListener(HideEvent.type, handleTapsiNoticeHide);