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

Sheet

Extends the Dialog component to display content that complements the main content of the screen.

Installation#

npx shadcn@latest add @rescript-shadcn/Sheet

Usage#

<Sheet>
  <Sheet.Trigger render={<Button variant=Outline />}>
    {"Open"->React.string}
  </Sheet.Trigger>
  <Sheet.Content>
    <Sheet.Header>
      <Sheet.Title> {"Are you absolutely sure?"->React.string} </Sheet.Title>
      <Sheet.Description> {"This action cannot be undone."->React.string} </Sheet.Description>
    </Sheet.Header>
  </Sheet.Content>
</Sheet>

Examples#

Side#

Use the side prop on SheetContent to set the edge of the screen where the sheet appears. Values are top, right, bottom, or left.

No Close Button#

Use showCloseButton={false} on SheetContent to hide the close button.

API Reference#

See the Base UI Dialog documentation.

@react.component
let make = () =>
  <Sheet>
@react.component
let make = () =>
  <Sheet>
@module("tailwind-merge")
external cn: (string, option<string>) => string = "twMerge"