Primitives

Toast

Tone icons in tiles, a tone wash, promises with a spinner. Nine positions: every corner and edge, and the middle of the screen.

Pick a spot on the screen.

toast("…", { position: "bottom-right" }) · or <Toaster position="bottom-right" />

Import#

Everything comes from the package root. The example above uses:

your-component.tsx
import { Button, Toaster, toast, type ToastPosition } from "@waveinno/ui";

Props#

Read from the source of this version, so they match the code exactly.

<Toaster>

src/components/ui/toast.tsx
PropTypeDefaultDescription
position"top-left" | "top-center" | "top-right" | "middle-left" | "middle-center" | "middle-right" | "bottom-left" | "bottom-center" | "bottom-right""bottom-right"

Also takes Omit<React.ComponentProps<typeof Sonner>, "position">.

<Button>

src/components/ui/button.tsx
PropTypeDefaultDescription
asChildbooleanfalse
loadingboolean—

Also takes ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonVariants>.

Install#

If the project does not have the package yet, add it, then follow the setup for Next.js or Vite once.

$ npm install @waveinno/ui