logonpix

Toast

Example
Props

Placement

Installation
npx npix@latest add Toast
Usage
<>
	<Button
		onClick={() =>
			toast({
				title: "Form submitted!",
				placement,
				icon: <CheckCircleIcon fill="#76c12b" className="w-6 h-6" />,
			})
		}
	>
		Try me
	</Button>
</>
API

title

React.ReactNode

Title


icon

React.ReactNode

Icon to show next to title


placement

"top-left" | "top-right" | "bottom-left" | "bottom-right"

Placement of toast. By default is top-right


children

React.ReactNode

Body content for the toast


FieldDescriptionType
titleTitleReact.ReactNode
iconIcon to show next to titleReact.ReactNode
placementPlacement of toast. By default is top-right"top-left" | "top-right" | "bottom-left" | "bottom-right"
childrenBody content for the toastReact.ReactNode