Skip to main content

Popover

A floating content box anchored to a trigger element — for menus of custom content, filter panels, or info callouts that aren't a flat action list (see Menu for that).

Toggle popover
const [isVisible, setIsVisible] = useState(false);

<Popover
isVisible={isVisible}
onClose={() => setIsVisible(false)}
content={<Box p="s-2"><Text>Popover content</Text></Box>}
>
<Button label="Toggle popover" onPress={() => setIsVisible(v => !v)} />
</Popover>

Props​

PropTypeDefaultDescription
childrenReactNodeRequired. The trigger element the popover is anchored to.
contentReactNodeRequired. The popover body content.
isVisiblebooleanRequired. Controls visibility.
onClose() => voidRequired. Called on outside-tap or onRequestClose.
placement'top' | 'bottom''bottom'Which side of the trigger the content opens toward.
align'start' | 'end''start'Horizontal alignment relative to the trigger.
bgTVajraColors'surfaceRaised'Content background color.
roundedTRoundedToken'r-2'Content corner radius.
closeOnOutsidePressbooleantrueCloses when tapping outside the content.
testIDstringTest identifier forwarded to the content container.