Toast
Component used to inform users of events or actions, such as success messages or error alerts. Toasts are triggered programmatically using the useVcToast composable.
You will also need to add this in your App.vue
vue
// import { VcToastContainer } from '@wisemen/vue-core-components'
<VcToastContainer />Props
Prop
Description
Default
description *
A description providing additional details.
-title *
The main title of the toast.
-type *
The type of toast. This will determine the icon and color of the toast.
-actions
One or more action buttons to display in the toast.
[]icon
The icon to display in the toast.
This will be ignored if a preview is provided.
If left unset and no preview is given, a default icon based on type is shown.
nullpreview
The preview to be displayed in the toast. If set, the icon will be replaced by this preview.
nulltestId
A unique identifier used for testing purposes. If set to null, no test ID will be applied.
nullDefault styles
Slot
Classes
base
-title
truncate text-sm text-primary font-semiboldactions
flex items-center gap-x-sm mt-lgdescription
mt-xs line-clamp-2 text-sm text-secondaryicon
size-5 group-data-[type=success]/toast:text-success-primary group-data-[type=error]/toast:text-error-primary group-data-[type=info]/toast:text-fg-brand-primaryroot
group/toast relative pointer-events-auto grid grid-cols-[auto_1fr] items-start gap-lg w-100 border border-solid border-secondary rounded-xl bg-primary dark:bg-secondary p-xl shadow-lg outline-brand-500