{
  "$schema": "https://design.senvenli.com/schema/component.full.json",
  "kind": "component",
  "family": "overlay",
  "status": "alpha",
  "import": "@senvenli/react/overlay",
  "genui": {
    "expose": false
  },
  "name": "drawer",
  "title": "Drawer",
  "exports": [
    "Drawer"
  ],
  "description": "A panel that slides in from the side, or a bottom sheet on phones, for detail and edit views beside the page.",
  "keywords": [
    "drawer",
    "sheet",
    "side panel",
    "bottom sheet"
  ],
  "usage": {
    "when": [
      "Viewing or editing a record while keeping the list in view."
    ],
    "instead": [
      {
        "use": "dialog",
        "when": "The task needs full attention."
      }
    ]
  },
  "a11y": {
    "keyboard": [
      {
        "keys": "Esc",
        "does": "Closes, asking first when there are unsaved changes."
      }
    ],
    "builtIn": [
      "Unsaved changes ask before closing in a real nested modal.",
      "The bottom sheet has a grip to expand or close."
    ],
    "youProvide": [
      "A title."
    ]
  },
  "related": [
    "dialog"
  ],
  "source": [
    "src/overlay/drawer.tsx"
  ],
  "props": {
    "Drawer": [
      {
        "name": "isOpen",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "Open without a DialogTrigger (a URL, a row click). Inside a DialogTrigger, put `onOpenChange` on the\ntrigger instead: the trigger owns the state there.",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "defaultOpen",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "onOpenChange",
        "type": "(isOpen: boolean) => void",
        "required": false,
        "origin": "own"
      },
      {
        "name": "title",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own"
      },
      {
        "name": "description",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "Under the title: \"Jordan Lee · 14–18 Oct\". When given, the drawer is described by it\n(`aria-describedby`); without it (or with `\"\"`, `false`, `null`) nothing is rendered."
      },
      {
        "name": "headerActions",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "Beside the close button: a status Badge, a menu."
      },
      {
        "name": "children",
        "type": "React.ReactNode",
        "required": true,
        "origin": "own"
      },
      {
        "name": "footer",
        "type": "React.ReactNode",
        "required": false,
        "origin": "own",
        "description": "Sticky at the bottom: the record's actions."
      },
      {
        "name": "size",
        "type": "OverlaySize",
        "required": false,
        "origin": "own",
        "description": "small 380px, large 560px (medium reads as large).",
        "schema": {
          "type": "string",
          "enum": [
            "small",
            "medium",
            "large"
          ]
        }
      },
      {
        "name": "position",
        "type": "DrawerPosition",
        "required": false,
        "origin": "own",
        "description": "The edge it slides in from, at every width (the app decides, e.g. `bottom` on phones): `end` (default) and\n`start` are the inline sides and mirror in right-to-left; `bottom` is a sheet that snaps between half and full\nheight; `top` drops down from above.",
        "schema": {
          "type": "string",
          "enum": [
            "top",
            "bottom",
            "start",
            "end"
          ]
        }
      },
      {
        "name": "hasUnsavedChanges",
        "type": "boolean",
        "required": false,
        "origin": "own",
        "description": "Closing (button, Esc, scrim, useDrawerClose) asks first: \"Unsaved changes\".",
        "schema": {
          "type": "boolean"
        }
      },
      {
        "name": "motion",
        "type": "ComponentMotion",
        "required": false,
        "origin": "own",
        "description": "`auto` (follow the device), `reduce` or `none`, for this component; the provider's setting otherwise.",
        "schema": {
          "type": "string",
          "enum": [
            "none",
            "auto",
            "reduce"
          ]
        }
      }
    ]
  },
  "tokens": [
    "ds-blanket",
    "ds-border",
    "ds-border-bold",
    "ds-border-focused",
    "ds-easing-enter",
    "ds-easing-exit",
    "ds-radius-full",
    "ds-radius-xlarge",
    "ds-shadow-overlay",
    "ds-space-025",
    "ds-space-100",
    "ds-space-150",
    "ds-space-200",
    "ds-space-300",
    "ds-surface-overlay",
    "ds-text",
    "ds-text-subtle"
  ],
  "strings": [
    "close",
    "collapseSheet",
    "discardClose",
    "expandSheet",
    "keepEditing",
    "newTab",
    "unsavedBody",
    "unsavedTitle"
  ],
  "quality": {
    "tests": true,
    "a11y": false,
    "docs": false,
    "visual": false,
    "dark": false,
    "rtl": false,
    "mcp": true,
    "generic": true
  }
}
