---
title: Rewrite Panel
description: The mode and model list with a Rewrite button that opens from Rewrite and More.
---

<Component path="perplexity/examples/perplexity-rewrite-panel" />

<RegistryInstall name="perplexity-rewrite-panel" />

Perplexity shows this panel when you rewrite an answer. It lists the modes, Search, Deep research and Learn step by step, with a check on the selected one. Below a separator sit the "Access the top AI models" row and the model list in a shadcn `ScrollArea`, and a full-width Rewrite button closes it. Locked modes and models show a lock. `PerplexityActions` opens it from the Rewrite action in a shadcn `Popover`, and from More → Rewrite in a `DropdownMenuSub`.

| Prop | Default | Description |
| --- | --- | --- |
| `modes` | Search, Deep research, Learn step by step | The mode rows. |
| `defaultMode` | `search` | The mode that starts checked. |
| `models` | `PERPLEXITY_MODELS` | The model list. |
| `promoLabel` | `Access the top AI models` | The label of the promo row. |
| `onRewrite` | | Called with `{ mode }` when Rewrite is pressed. |
| `onClose` | | Called after Rewrite, so a host popover can close. |

## Used in

**[Perplexity](/blocks/perplexity)**

A full recreation of a Perplexity thread with search steps, citations with hover cards and the composer.
