Theme

Start Here

Start from the smallest working snippet, then move to interactive examples and the full API contract below.

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 } 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'

Customize

Use the interactive examples to see common variants, states, and composition patterns before building your own.

Basic Popover

Popover content. This floats above the page anchored to the trigger.

svelte
<Popover.Root>
  <Popover.Trigger>
    <Button variant="outline">Open Popover</Button>
  </Popover.Trigger>
  <Popover.Content>
    <p>Popover content. This floats above the page anchored to the trigger.</p>
  </Popover.Content>
</Popover.Root>

Popover with offset

Popover with a 12px offset from its trigger element.

svelte
<Popover.Root>
  <Popover.Trigger>
    <Button variant="outline">Open Popover</Button>
  </Popover.Trigger>
  <Popover.Content offset={12}>
    <p>Popover with custom offset from trigger.</p>
  </Popover.Content>
</Popover.Root>

Structure

Compound components always start with Popover.Root. Use this structure block to understand required wrappers before you wire state or styling.

Popover.Root
  Popover.Trigger
  Popover.Content
Popover.Root Popover.TriggerPopover.Content

Compose

The full API contract lives here: props, CSS variables, and the public data attributes you can target when styling.

Compound component. Start with Popover.Root, then add only the parts you need.

Popover.TriggerPopover.Content

Popover.Root

Prop Type Default Required Bindable
open
boolean
false
children
Snippet

Also accepts standard HTML attributes (class, style, id, etc.)

Popover.Trigger

Prop Type Default Required Bindable
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.

Popover.Content

Prop Type Default Required Bindable
offset
number
children
Snippet

Forwards <div> attributes via rest props. Common examples: id, style, role.