Headless component library for Svelte powered by zag
npm install ui-ingredients
# yarn add ui-ingredients
# pnpm add ui-ingredients
<script lang="ts">
import {Dialog, Portal} from 'ui-ingredients';
import {XCloseIcon, Button} from '$lib';
</script>
<Dialog.Root lazyMount keepMounted>
<Dialog.Trigger>
{#snippet asChild(attrs)}
<Button {...attrs}>Open</Button>
{/snippet}
</Dialog.Trigger>
<Portal>
<Dialog.Backdrop />
<Dialog.Positioner>
<Dialog.Content>
<Dialog.Title>Title</Dialog.Title>
<Dialog.Description>Description</Dialog.Description>
<Dialog.CloseTrigger>
<XCloseIcon />
</Dialog.CloseTrigger>
</Dialog.Content>
</Dialog.Positioner>
</Portal>
</Dialog.Root>
asChild
propView components demo here