Skip to main content

useToast

useToast is a notification hook for showing brief messages, like confirming an export or announcing an active preview. It returns functions to show and hide notifications in the closest toast provider.

Import

import { useToast } from '@vortexlabs/vortex';

Return value

useToast return value
PropTypeDefaultAttributes
show
function
No default value
hide
function
No default value
id
string
No default value

show

show options
PropTypeDefaultAttributes
layout
union
inline
icon
union
No default value
startSlot
React.ReactNode
No default value
title
React.ReactNode
No default value
description
React.ReactNode
No default value
children
React.ReactNode
No default value
actionsSlot
React.ReactNode
No default value
tone
union
inverse
className
union
No default value
attributes
object
No default value
timeout
union
brief
position
union
bottom-end