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'

Props

PropertyDefaultType
animationtrueboolean

Apply a CSS fade transition to the toast.

autohidetrueboolean

Auto hide the toast.

colorDeprecated 6.0.0-Color

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

Use theme instead — color renders the same theme-{color} class and loses to theme when both are set.

delay5000number

Delay hiding the toast (ms).

show6.0.0+undefinedboolean

Control the visibility. When set, the toast renders what show says and internal gestures only emit update:show — nothing closes until the parent flips the prop. Supports the v-model:show binding.

theme6.0.0+-Color

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

translucent6.0.0+-boolean

Let the background through the toast and blur it.

visibleDeprecated 6.0.0undefinedboolean

Toggle the visibility of component.

Use show / v-model:show instead — visible is ignored when show is set.

Events

Event name
close

Callback fired when the component requests to be closed.

show

Callback fired when the component requests to be shown.

update:show

Emit the requested visibility to support the v-model:show binding.

CToastBody

jsx
import { CToastBody } from '@coreui/vue'

CToastClose

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

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'
PropertyDefaultType
ariaCloseLabel5.10.0+-string

Sets the aria-label of the close button.

closeButton-boolean

Automatically add a close button to the header.