Popover
Rich floating content anchored to a trigger.
Installation
Installs the style saved in lily.json. For a new Diamond project,
run lily-svelte init --style diamond first.
Install the lily base and `utils` (run once per project).
npx lily-svelte@latest init Copy the popover source from the registry into $lib/components/ui/popover.
Usage
<script lang="ts">
import { Popover, PopoverTrigger, PopoverContent } from '$lib/components/ui/popover';
import { Button } from '$lib/components/ui/button';
</script>
<Popover>
<PopoverTrigger>
{#snippet child({ props })}
<Button variant="ghost" {...props}>Open</Button>
{/snippet}
</PopoverTrigger>
<PopoverContent>Place content here.</PopoverContent>
</Popover>