Popover
A violet-framed popup anchored to its trigger.
Install and use
The first command adds the component and the Mine theme, the second adds this example. Render <Mine> once near your root for the skin, sounds and narrator.
"use client"
import { Field, FieldLabel } from "@/components/ui/field"
import { Input } from "@/components/ui/input"
import {
Popover,
PopoverClose,
PopoverContent,
PopoverDescription,
PopoverTitle,
PopoverTrigger,
} from "@/components/ui/popover"
function Example() {
return (
<Popover>
<PopoverTrigger>Share</PopoverTrigger>
<PopoverContent>
<PopoverTitle>Share this document</PopoverTitle>
<PopoverDescription>
Anyone with the link can view it.
</PopoverDescription>
<Field>
<FieldLabel>Link</FieldLabel>
<Input readOnly defaultValue="acme.app/d/q3-roadmap" />
</Field>
<div data-slot="row">
<PopoverClose>Cancel</PopoverClose>
<PopoverClose data-variant="solid">Copy Link</PopoverClose>
</div>
</PopoverContent>
</Popover>
)
}
export { Example }