Skip to main content

Popover

Import

import { Popover, PopoverTrigger, PopoverArrow, PopoverClose, PopoverContent } from "@sparrowengg/twigs-react";

Usage

<Popover>
<PopoverTrigger asChild>
<Button>
Trigger the popover
</Button>
</PopoverTrigger>
<PopoverContent>
Hello there
<PopoverClose> Close me</PopoverClose>
<PopoverArrow />
</PopoverContent>
</Popover>

Props

Popover

PropertyDescriptionTypeDefault
defaultOpenuncontrolled open statebooleanfalse
opencontroller open stateboolean
onOpenChangecallback function for state changes