toast

Toast

Short messages that confirm an action, like adding to the cart, with an optional action button; mount Toaster once and call toast() anywhere.

Parts

PartFileDoes
ToastToast.vueHolds the toasts that toast() shows, short messages that confirm an action such as adding to the cart.

Styling

All of Toast’s styles live in toast.json. New to styling in Frontic UI? How styling works →

Install

npm packages
@lucide/vue
@vueuse/core
class-variance-authority
reka-ui
vue-sonner

API reference

Toast.vue

Holds the toasts that toast() shows, short messages that confirm an action such as adding to the cart. Mount it once.

Props 19

PropTypeDefault
idstring—
invertbooleanfalse
themeTheme—
positionPosition—
closeButtonPositionCloseButtonPosition—
hotkeystring[]—
richColorsbooleanfalse
expandbooleanfalse
durationnumber—
gapnumber—
visibleToastsnumber—
closeButtonbooleanfalse
toastOptionsToastOptions—
offsetOffset—
mobileOffsetOffset—
dir'ltr' | 'rtl' | 'auto'—
swipeDirectionsSwipeDirection[]—
iconsToastIcons—
containerAriaLabelstring—

Recipe toast 5 groups

Recipe toast-action 2 groups

Recipe toast-cancel 2 groups

Recipe toast-content 1 group

Recipe toast-description 1 group

Recipe toast-title 1 group

Toast
State