Popover
A panel that opens from a button and holds anything. Built on Base UI.
import { Popover } from "@forgeron/ui";import { Button, Field, Input, Popover } from "@forgeron/ui";
export default function Form() {
return (
<Popover
label="Rename"
title="Rename"
description="Shown to everyone in the workspace."
showClose
trigger={<Button size="sm">Rename</Button>}
>
<Field label="Name">
{(control) => <Input {...control} defaultValue="Quarterly report" />}
</Field>
</Popover>
);
}API → Props
| Prop | Type | Default | Description |
|---|---|---|---|
trigger | ReactElement | — | The control that opens it: one element that takes a ref. |
label | string | — | Names the panel. |
title / description | ReactNode | — | A heading and one line inside. |
children | ReactNode | — | The content. |
open / defaultOpen / onOpenChange | boolean / boolean / (open) => void | — | Controlled or not. |
side / align | top | bottom | left | right / start | center | end | bottom / start | Placement. |
width | number | — | px; the content's own by default. |
showClose | boolean | false | A close button in the corner. |
modal | boolean | "trap-focus" | false | Lock the page, or keep Tab inside. |
className | string | — | Extra classes. |