For AI agents: the complete documentation index is available at https://rickyshin93.github.io/tao-ui/llms.txt, the full documentation bundle is available at https://rickyshin93.github.io/tao-ui/llms-full.txt, and this page is available as Markdown at https://rickyshin93.github.io/tao-ui/components/drawer.md.
v0.0.57
  • English
  • Drawer

    Feedback@rockshin/tao-ui

    Opens a side panel for related tasks without leaving the current page.

    When to use

    Use Drawer for inspection, editing, or supporting workflows that should stay connected to the current page.

    Recommended

    • Use a clear title and predictable close affordance.
    • Keep destructive confirmations in a dedicated confirmation step.

    Avoid

    • Do not stack multiple drawers for a single workflow.

    Examples

    Basic usage

    TSX

    Placement and size

    TSX
    TSX

    Resizable drawer

    TSX

    Preset and custom sizes

    Use a size preset or set the required width or height.

    TSX

    Mask and close controls

    Configure the mask, mask dismissal, and close button while keeping an explicit exit path.

    TSX

    Resizable drawer

    resizable lets users drag the edge when a detail panel needs more workspace.

    TSX

    API

    Drawer

    PropertyDescriptionTypeDefault Value
    extraExtra content rendered on the trailing side of the header.ReactNode-
    footerFooter content; renders a bordered footer area when provided.ReactNode-
    sizePreset drawer size: default (378) / large (736). width/height override it.DrawerSize | undefined-
    closableShow the close (×) button. Defaults to true.boolean | undefinedtrue
    closeIconCustom close icon.ReactNode-
    maskClosableClose when clicking the mask. Defaults to true.boolean | undefinedtrue
    maskRender the mask/overlay. Defaults to true.boolean | undefinedtrue
    keyboardClose on Esc key. Defaults to true.boolean | undefinedtrue
    resizableAllow resizing by dragging the inner edge. Pass an object for resize callbacks.boolean | DrawerResizableConfig | undefined-
    afterOpenChangeCalled after open transitions in either direction.((open: boolean) => void) | undefined-
    afterCloseCalled after the drawer has fully closed.(() => void) | undefined-
    destroyOnHiddenUnmount children when closed. Defaults to true. Set false to keep children mounted while releasing modal interaction locks when hidden.boolean | undefinedtrue