Skins UI

Pixel toast

A deep blue message box with a white notched border, like an old RPG.

Customize

Props
Type

Installation

npx shadcn@latest add https://skinsui.dev/r/toast-pixel.json

Usage

usage.tsx
import { Button } from "@/components/skins/button-pixel";import { ToastProvider, useToast } from "@/components/skins/toast-pixel";export function App() {  return (    <ToastProvider>      <SaveButton />    </ToastProvider>  );}function SaveButton() {  const toast = useToast();  return (    <Button      onClick={() =>        toast.add({          title: "Changes saved",          description: "Your new skin is live for everyone on the team.", type: "success",        })      }    >      Show toast    </Button>  );}

Props

  • limit"3"
    "1" | "3" | "5"

    How many toasts can show at once. Older ones fold away behind the newest.

  • timeout5000
    number

    How long each toast stays, in milliseconds. Hovering keeps it.

Parts

  • ToastProvider<div>

    Wrap your app once. It holds the toasts and draws them in the corner.

  • useToast<hook>

    Returns add, update and close. Call add with a title, a description and a type.