WritedocsWritedocs

Searchbar

Searchbar adds a box above a table. As the reader types, only the rows that contain the text stay - for a reference too long to scan by eye. Try typing 4xx or payment below:

<Searchbar placeholder="Filter error codes...">
| Code | Status | Meaning |
| --- | --- | --- |
| `invalid_request` | 400 (4xx) | The request is missing a field or has a wrong value. |
| `unauthorized` | 401 (4xx) | The API key is missing or wrong. |
| `payment_declined` | 402 (4xx) | The card was declined. |
</Searchbar>

The search ignores upper and lower case, and the table’s header row always stays. It filters the rows of tables inside it - other content stays as it is.

Props

placeholder string default: Search...

The text in the box before the reader types.

To search the whole site, readers use the search in the topbar.