> For the complete documentation index, see [llms.txt](https://docs.navigaglobal.com/dashboard-plugin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.navigaglobal.com/dashboard-plugin/api-and-gui/api/usesheet.md).

# useSheet

useSheet is a helper hook will returns sheet's component context-api

The sheet context-api has methods to modify the opened sheet, such like setting title, header, size...

## How to use

```jsx
import { Plugin } from '@root'
import { useEffect } from 'react'

const MyCustomComponent = props => {
    const sheetAPI = Plugin.useSheet()
    
    useEffect(() => {
        sheetAPI.setTitle('My awesome modal')
    }, [])
    
    return (
        <div>
            <p>I am a child inside a Sheet</p>
        </div>
    )
}

export default MyCustomComponent
```

{% hint style="info" %}
useSheet() is only available as long as your component is rendered as a child inside the sheet component.
{% endhint %}

## Available methods

| name             | type     | description                                                      |
| ---------------- | -------- | ---------------------------------------------------------------- |
| open             | function | open the sheet                                                   |
| close            | function | close the sheet                                                  |
| isOpen           | boolean  | boolean value to check if the sheet is open or not               |
| setTitle         | function | set the title of the sheet in the top header                     |
| setCloseOnESC    | function | set if the sheet should be close when the user press the ESC key |
| setHeaderButtons | function | set a custom header buttons components                           |
| setFooterButtons | function | set a custom footer buttons components                           |
| DOM\_NODE        | DOM      | the DOM element of the sheet wrapper                             |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.navigaglobal.com/dashboard-plugin/api-and-gui/api/usesheet.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.
