# Header

The `Header` component provides a header section with a title and optional children components.

### Preview

<div align="left"><figure><img src="/files/J9vlsNN0wdfgaA5Nzilr" alt="Gravity header component" width="563"><figcaption></figcaption></figure></div>

### Usage

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

function MyComponent({ ...props }) {
  return (
    <Header title='My View Title'>
      <p>Optional content goes here.</p>
    </Header>
  );
}
```

### Props

| Prop     | Description        | Required | Value        |
| -------- | ------------------ | -------- | ------------ |
| children | children to render | optional | component(s) |
| title    | title of the view  | required | string       |

### Notes

* The `title` prop provides the title for the header section.
* The `children` prop allows for rendering additional components within the header.


---

# 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/header.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.
