Skip to content

Popover

<ts-popover> vv0.4.0

The ts-popover component.

Open in Storybook for interactive demos.

<ts-popover placement="bottom" trigger="click">Content</ts-popover>
PropertyAttributeTypeDefaultDescription
dismissibledismissiblebooleantrueWhether the popover closes on outside click or Escape.
openopenbooleanfalseWhether the popover is currently visible.
placementplacement"bottom" | "bottom-end" | "bottom-start" | "left" | "right" | "top" | "top-end" | "top-start"'bottom'Placement of the popover relative to the trigger.
triggertrigger"click" | "hover" | "manual"'click'How the popover is triggered.
EventDetailBubblesComposedDescription
tsClosevoidYesYesEmitted when the popover closes.
tsOpenvoidYesYesEmitted when the popover opens.
MethodSignatureDescription
hidehide() => Promise<void>Programmatically hide the popover.
showshow() => Promise<void>Programmatically show the popover.
NameDescription
*(default)*Default slot for popover content.
triggerThe element that triggers the popover.

Use ::part() to style internal elements:

PartDescription
arrowThe popover arrow.
baseThe popover container.
triggerThe trigger wrapper.
ts-popover::part(arrow) {
/* your custom styles */
}
<ts-popover placement="bottom" trigger="click">Content</ts-popover>
import { TsPopover } from '@tessera-ui/react';
<TsPopover dismissible placement="bottom">Content</TsPopover>