Skip to content
Overlays & Tooltips

Drawer

Bottom drawer (vaul).

Import

tsx
import { Drawer } from "@cronus-ui/ui";
bash
npx cronus-ui add drawer

Examples

.cronus

The same component declared in Cronus. Emitted at build time from the audit fixtures — the kernel renders it as HTML with no React.

PortedParity: MatchGeometry 1/1Pixel diff 0 pxLogic 1/1Parity scoreboard
default.cronus
app "audit-fixtures" {
  port 5176
}

style {
  preset aurora
  theme dark
}

component DrawerDefault layout:inline style:drawer {
  description:"Narrow the list."
  label "Filters"
}

page "/audit/drawer/default" type:custom {
  use DrawerDefault
}

API Reference

Generated from the component's exported types.

DrawerProps

Extends ComponentProps<typeof DrawerPrimitive.Root>

Skip DrawerProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

DrawerTriggerProps

Extends ComponentPropsWithoutRef<typeof DrawerPrimitive.Trigger>

Skip DrawerTriggerProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

DrawerPortalProps

Extends ComponentPropsWithoutRef<typeof DrawerPrimitive.Portal>

Skip DrawerPortalProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

DrawerCloseProps

Extends ComponentPropsWithoutRef<typeof DrawerPrimitive.Close>

Skip DrawerCloseProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

DrawerOverlayProps

Extends ComponentPropsWithoutRef<typeof DrawerPrimitive.Overlay>

Skip DrawerOverlayProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

DrawerContentProps

Extends ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>

Skip DrawerContentProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

DrawerHeaderProps

Extends ComponentProps<"div">

Skip DrawerHeaderProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

DrawerFooterProps

Extends ComponentProps<"div">

Skip DrawerFooterProps props table
PropTypeDefaultDescription
className
string—Additional class names merged onto the root.
children
ReactNode—Contents of the component.
id
string—DOM id of the root element.

DrawerTitleProps

Extends ComponentPropsWithoutRef<typeof DrawerPrimitive.Title>

Skip DrawerTitleProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.

DrawerDescriptionProps

Extends ComponentPropsWithoutRef<typeof DrawerPrimitive.Description>

Skip DrawerDescriptionProps props table
PropTypeDefaultDescription
asChild
boolean—Render as the child element via Slot.
children
ReactNode—Contents of the component.
className
string—Additional class names merged onto the root.