Strongtie Design System
Getting StartedComponents

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Setup Guide
  • Package Installation
  • Code Quality Setup
  • Migration Guide
  • Resources
Registry
  • Getting Started
  • Combobox
  • Datepicker
  • MultiSelect
  • Tree
Guides
  • Framework Recommendations
Foundations
  • States
  • Variables
Components
  • Accordion
  • Alert
  • Alert Dialog
  • Avatar
  • Badge
  • Breadcrumb
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Collapsible
  • Command
  • Combobox
  • Context Menu
  • Date Picker
  • Dialog
  • Drawer
  • Dropdown Menu
  • Empty
  • Field
  • Hover Card
  • Input
  • Input Group
  • Item
  • Kbd
  • Label
  • Menubar
  • Multi Select
  • Navigation Menu
  • Pagination
  • Popover
  • Progress
  • Radio Group
  • Scroll Area
  • Select
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Switch
  • Table
  • Tabs
  • Textarea
  • Toaster
  • Toggle
  • Toggle Group
  • Tooltip
  • Tree
2026 Simpson Strong-Tie
  1. Docs
  2. Components
  3. Drawer

Drawer

PreviousNext

Drawer component for the Simpson Strong-Tie design system.

Example

"use client"

import { Button } from "@strongtie/design-system/button"
import {
  Drawer,
  DrawerClose,
  DrawerContent,
  DrawerDescription,
  DrawerFooter,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@strongtie/design-system/drawer"

export function DrawerDefault() {
  return (
    <Drawer>
      <DrawerTrigger asChild>
        <Button variant="outline">Open Drawer</Button>
      </DrawerTrigger>
      <DrawerContent>
        <DrawerHeader>
          <DrawerTitle>Are you absolutely sure?</DrawerTitle>
          <DrawerDescription>This action cannot be undone.</DrawerDescription>
        </DrawerHeader>
        <div className="p-4">
          <p className="text-muted-foreground text-sm">
            This will permanently delete your account and remove your data from
            our servers.
          </p>
        </div>
        <DrawerFooter>
          <Button>Submit</Button>
          <DrawerClose asChild>
            <Button variant="outline">Cancel</Button>
          </DrawerClose>
        </DrawerFooter>
      </DrawerContent>
    </Drawer>
  )
}

Installation

npm install @strongtie/design-system
import { Drawer } from "@strongtie/design-system/drawer"

Components

This module exports the following components:

  • Drawer
  • DrawerClose
  • DrawerContent
  • DrawerDescription
  • DrawerFooter
  • DrawerHeader
  • DrawerOverlay
  • DrawerPortal
  • DrawerTitle
  • DrawerTrigger

Props

<Drawer>

PropTypeDefaultDescription
activeSnapPointstring | number | null-
autoFocusboolean-
closeThresholdnumber0.25Number between 0 and 1 that determines when the drawer should be closed. Example: threshold of 0.5 would close the drawer if the user swiped for 50% of the height of the drawer or more.
containerHTMLElement | null-
defaultOpenbooleanfalseOpened by default, skips initial enter animation. Still reacts to open state changes
directiontop | bottom | left | right'bottom'Direction of the drawer. Can be top or bottom, left, right.
disablePreventScrollbooleanfalseWhen set to true prevents scrolling on the document body on mount, and restores it on unmount.
dismissiblebooleantrueWhen false dragging, clicking outside, pressing esc, etc. will not close the drawer. Use this in comination with the open prop, otherwise you won't be able to open/close the drawer.
fixedboolean-When true, don't move the drawer upwards if there's space, but rather only change it's height so it's fully scrollable when the keyboard is open
handleOnlybooleanfalseWhen true only allows the drawer to be dragged by the <Drawer.Handle /> component.
modalbooleantrueWhen false it allows to interact with elements outside of the drawer without closing it.
nestedboolean-
noBodyStylesboolean-When true the body doesn't get any styles assigned from Vaul
onAnimationEnd((open: boolean) => void)-Gets triggered after the open or close animation ends, it receives an open argument with the open state of the drawer by the time the function was triggered. Useful to revert any state changes for example.
onClose(() => void)-
onDrag((event: PointerEvent<HTMLDivElement>, percentageDragged: number) => void)-
onOpenChange((open: boolean) => void)-
onRelease((event: PointerEvent<HTMLDivElement>, open: boolean) => void)-
openboolean-
preventScrollRestorationboolean-
repositionInputsbooleantrue when {@link snapPoints } is definedWhen true Vaul will reposition inputs rather than scroll then into view if the keyboard is in the way. Setting it to false will fall back to the default browser behavior.
scrollLockTimeoutnumber500msDuration for which the drawer is not draggable after scrolling content inside of the drawer.
setActiveSnapPoint((snapPoint: string | number | null) => void)-
setBackgroundColorOnScalebooleantrueWhen false we don't change body's background color when the drawer is open.
shouldScaleBackgroundboolean-
snapToSequentialPointbooleanfalseDisabled velocity based swiping for snap points. This means that a snap point won't be skipped even if the velocity is high enough. Useful if each snap point in a drawer is equally important.

Example

"use client"

import { Button } from "@strongtie/design-system/button"
import {
  Drawer,
  DrawerClose,
  DrawerContent,
  DrawerDescription,
  DrawerFooter,
  DrawerHeader,
  DrawerTitle,
  DrawerTrigger,
} from "@strongtie/design-system/drawer"

export function DrawerDefault() {
  return (
    <Drawer>
      <DrawerTrigger asChild>
        <Button variant="outline">Open Drawer</Button>
      </DrawerTrigger>
      <DrawerContent>
        <DrawerHeader>
          <DrawerTitle>Are you absolutely sure?</DrawerTitle>
          <DrawerDescription>This action cannot be undone.</DrawerDescription>
        </DrawerHeader>
        <div className="p-4">
          <p className="text-muted-foreground text-sm">
            This will permanently delete your account and remove your data from
            our servers.
          </p>
        </div>
        <DrawerFooter>
          <Button>Submit</Button>
          <DrawerClose asChild>
            <Button variant="outline">Cancel</Button>
          </DrawerClose>
        </DrawerFooter>
      </DrawerContent>
    </Drawer>
  )
}

Styling

Components can be styled using the className prop. The design system uses Tailwind CSS for styling.

Classes

CSS classes used by this component:

  • drawer-content
  • drawer-description
  • drawer-footer
  • drawer-header
  • drawer-overlay
  • drawer-title

Accessibility

Ensure proper accessibility attributes are added when implementing this component.

DialogDropdown Menu

On This Page

ExampleInstallationComponentsProps<Drawer>ExampleStylingClassesAccessibility

Contribute

  • Report an issue
  • Request a feature
  • Edit this page