ReScript Shadcn
Get started
  • Installation
Components
  • Accordion
  • Alert
  • AlertDialog
  • AspectRatio
  • Attachment
  • Avatar
  • Badge
  • Breadcrumb
  • Bubble
  • Button
  • ButtonGroup
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Combobox
  • Command
  • ContextMenu
  • DataTable
  • DatePicker
  • Dialog
  • Direction
  • Drawer
  • DropdownMenu
  • Empty
  • Field
  • HoverCard
  • Input
  • InputGroup
  • InputOtp
  • Item
  • Kbd
  • Label
  • Marker
  • Menubar
  • Message
  • MessageScroller
  • NativeSelect
  • NavigationMenu
  • Pagination
  • Popover
  • Progress
  • RadioGroup
  • Resizable
  • ScrollArea
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Sonner
  • Spinner
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toast
  • Toggle
  • ToggleGroup
  • Tooltip
  • Typography

Toast

A succinct message that is displayed temporarily.

Installation#

npx shadcn@latest add @rescript-shadcn/Toast

Usage#

let _: string = Toast.toast.add({
  title: "Event created",
  description: "Sunday, December 3 at 9:00 AM",
})

Types#

Set type_ to success, info, warning, error, or loading to render a status icon.

Asynchronous updates#

Keep the returned toast id and update the toast as work progresses.

@@directive("'use client'")

@react.component
@@directive("'use client'")

@react.component
@@directive("'use client'")

@react.component