# Sheet

The `Sheet` component overlays a modal on the top, left, bottom, or right of the viewport.

### Preview

<div align="left"><figure><img src="/files/kNatNzg7j1UaOEArpbHh" alt="Gravity sheet component" width="370"><figcaption></figcaption></figure></div>

### Usage

```javascript
import { Sheet } from 'components/lib';

function MyComponent({ ...props }) {
  return (
    <div>
      <Sheet 
        trigger={ <button>Open Sheet</button> }
        title="Sheet Title"
        description="This is a description of the sheet."
        side="right">
        
          <div>Sheet content goes here.</div>
        
      </Sheet>
    </div>
  );
}
```

### Props

| Prop      | Description                  | Required | Value                                          |
| --------- | ---------------------------- | -------- | ---------------------------------------------- |
| children  | child component(s)           | required | component(s)                                   |
| className | custom style                 | optional | SCSS or Tailwind                               |
| side      | side where the sheet appears | optional | string (left/right/top/bottom), default: right |
| title     | sheet title                  | optional | string                                         |
| trigger   | trigger component            | required |                                                |

### Notes

* The `Sheet` component uses `SheetPrimitive` from `@radix-ui/react-dialog` for the sheet functionality.
* The `side` prop specifies the side of the viewport where the sheet will appear and defaults to 'right'.
* The `className` prop allows for custom styling to be applied.
* The `trigger` prop specifies the component that triggers the opening of the sheet.
* The `title` and `description` props provide additional context for the sheet.
* The `children` prop allows for rendering nested components within the sheet.
* For more details, refer to the [Shadcn Sheet documentation](https://ui.shadcn.com/docs/components/sheet).


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usegravity.app/gravity-web/components/sheet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
