Overlays
Popover
A small panel beside its button, in the browser’s top layer. It turns to the side with room.
Overlays
A small panel beside its button, in the browser’s top layer. It turns to the side with room.
Change the props on the right, then open the popover.
import { Button } from 'omuk-ui/button';
import {
Popover,
PopoverContent,
PopoverDescription,
PopoverHeader,
PopoverTitle,
PopoverTrigger,
} from 'omuk-ui/popover';
<Popover>
<PopoverTrigger render={<Button variant="outline" />}>
Open the popover
</PopoverTrigger>
<PopoverContent>
<div className="flex flex-col gap-3 p-3">
<PopoverHeader>
<PopoverTitle>Access tokens</PopoverTitle>
<PopoverDescription>A token lets the CLI read one environment.</PopoverDescription>
</PopoverHeader>
</div>
</PopoverContent>
</Popover>A title, a description and a ×. The title and the description name the panel for a screen reader. The panel pads nothing itself: its content does.
The focus goes to the first field when it opens. With open and onOpenChange, the form closes the popover when it is sent.