Toast
catnip-toast is viewport overlay feedback for a recent user or system action. Catnip positions it at the selected horizontal and vertical edge, and can dismiss it after a duration or from the close button.
Use Alert when the message belongs in the page layout.
The description prop handles plain text. Use the default slot when the message needs rich content such as a link or action button. Slotted content replaces description.
Live example
Guidelines
When to use
Use Toast for feedback caused by a recent user or system action when it should remain visible across the current viewport. Toasts are fixed to the viewport and use horizontalPosition plus verticalPosition.
Use Alert for messages that belong to a page, section, or related control.
Consumers should avoid mounting several toast instances at the same position without a queue or stack manager. Catnip does not provide one.
Write useful messages
Keep the title short and state the outcome first. Use the description to explain impact or the next useful step. Do not encode meaning only in the intent color or icon.
Use the plain description prop for ordinary copy. Use the default slot for links or actions. Do not also pass description in that case; slotted content replaces it and development builds warn about the ignored prop.
Timing and dismissal
The default duration="persistent" keeps the toast visible until its close button is used or the consumer removes it. Pass a non-negative number through the DOM property for automatic dismissal:
<catnip-toast
toast-title="Changes saved"
description="Your settings are up to date."
.duration="5000"
@dismiss="onDismiss($event.detail[0])"
/>Allow enough time to read the message and operate any link or action in its slot. Prefer persistent for long messages, urgent problems, and toasts with interactive content. A dismissed instance is one-shot; remount or recreate it when the same event needs to be announced again.
Icons
Leave leftIcon="" to use the Figma-mapped intent icon. Pass a valid CatnipIconName to change it with editor autocomplete, or provide leftIconSlot for custom visual content. The icon is decorative. Put all meaningful status text in the title or message.