Popover
Floating content panel anchored to a trigger
Popover content
Accessibility
- Avoid placing essential actions in hover-only or transient content; keyboard users must be able to reopen the popover.
Styled quick start
Copy this entrypoint first. It includes the imports required to get the component on screen.
svelte
<script lang="ts">
import '@dryui/ui/themes/default.css';
import '@dryui/ui/themes/dark.css';
import { Popover, Button } from '@dryui/ui';
</script>
<Popover.Root bind:open={popoverOpen}>
<Popover.Trigger>
<Button variant="outline">Info</Button>
</Popover.Trigger>
<Popover.Content>
<p>Popover details here.</p>
</Popover.Content>
</Popover.Root> Import options
Root package
ts
import { Popover } from '@dryui/ui' Per-component subpath
ts
import { Popover } from '@dryui/ui/popover' API
Props, CSS variables, and the public data attributes you can target when styling.
| Prop | Type | Description | Default | Required | Bindable |
|---|---|---|---|---|---|
Popover.Root | |||||
| open | boolean | Whether the overlay or disclosure is currently open. | false | — | ✓ |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |
Popover.Trigger | |||||
| children | Snippet | Content rendered inside the component. | — | ✓ | — |
Popover.Content | |||||
| placement | toptop-starttop-endbottombottom-startbottom-endleftleft-startleft-endrightright-startright-end | — | 'bottom' | — | — |
| offset | number | — | 8 | — | — |
| children | Snippet | Content rendered inside the component. | — | ✓ | — |