> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pharen.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Drawer

> Import and use the Drawer components from @pharen/ui.

export const PharenUiPreview = ({name, title = 'Pharen UI component preview'}) => <div className="not-prose my-6 overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm dark:border-white/10 dark:bg-zinc-950">
    <div className="pharen-ui-preview-root" data-pharen-ui-preview data-example={name} role="region" aria-label={title} />
  </div>;

Use **Drawer** to present a task in an edge-attached panel. This page covers every Vue component exported by the public module.

<PharenUiPreview name="drawer" title="Drawer preview" />

<Accordion title="View code">
  ```vue theme={null}
  <script setup lang="ts">
  import { Drawer, DrawerTrigger, DrawerContent } from '@pharen/ui';
  </script>

  <template>
    <Drawer>
      <DrawerTrigger>Open drawer</DrawerTrigger>
      <DrawerContent>Drawer content</DrawerContent>
    </Drawer>
  </template>
  ```
</Accordion>

## Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install @pharen/ui
  ```

  ```bash pnpm theme={null}
  pnpm add @pharen/ui
  ```

  ```bash yarn theme={null}
  yarn add @pharen/ui
  ```

  ```bash bun theme={null}
  bun add @pharen/ui
  ```
</CodeGroup>

<Note>
  Import `@pharen/ui/styles.css` exactly once in your application entrypoint.
</Note>

## Usage

```ts theme={null}
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger } from '@pharen/ui';
```

## Exports

| Export              | Purpose                                  |
| ------------------- | ---------------------------------------- |
| `Drawer`            | Exported Vue component from this module. |
| `DrawerClose`       | Exported Vue component from this module. |
| `DrawerContent`     | Contains the visible content.            |
| `DrawerDescription` | Renders supporting description.          |
| `DrawerFooter`      | Structures the footer region.            |
| `DrawerHeader`      | Structures the header region.            |
| `DrawerOverlay`     | Exported Vue component from this module. |
| `DrawerPortal`      | Exported Vue component from this module. |
| `DrawerTitle`       | Renders the accessible title.            |
| `DrawerTrigger`     | Opens or activates the component.        |

## Source

[Open the source on GitHub](https://github.com/PharenIT/ELEV8-Labs/tree/main/src/packages/ui/src/components/drawer)
