Vue Toast Component API

Toast API

Explore the API reference for the Vue Toast component and discover how to effectively utilize its props for customization.

CToast

jsx
import { CToast } from '@coreui/vue-pro'

Props

PropertyDefaultType
autohidetrueboolean

Auto hide the toast.

color-Color

Sets the color context of the component to one of CoreUI’s themed colors.

delay5000number

Delay hiding the toast (ms).

dismissibletrueboolean

Optionally add a close button to component and allow it to self dismiss.

index-number

index of the component.

title-string

Title node for your component.

visible-boolean

Toggle the visibility of component.

Events

Event name
close

Callback fired when the component requests to be closed.

show

Callback fired when the component requests to be shown.

CToastClose

jsx
import { CToastClose } from '@coreui/vue-pro'

Props

PropertyDefaultType
as-

Component used for the root node. Either a string to use a HTML element or a component.

Events

Event name
close

Event called before the dissmiss animation has started.

CToastHeader

jsx
import { CToastHeader } from '@coreui/vue-pro'
PropertyDefaultType
closeButton-boolean

Automatically add a close button to the header.

CToaster

jsx
import { CToaster } from '@coreui/vue-pro'
PropertyDefaultType
placement-string

Describes the placement of component.