Skip to content

calvo-jp/ui-ingredients

Folders and files

NameName
Last commit message
Last commit date

Latest commit

87ed597 · Mar 29, 2025
No commit message
Dec 24, 2024
Feb 16, 2025
Mar 29, 2025
Mar 29, 2025
Mar 29, 2025
Jan 22, 2025
Oct 12, 2024
Feb 16, 2025
Feb 16, 2025
Dec 21, 2024
Mar 18, 2025
Mar 9, 2025
Mar 29, 2025
Mar 29, 2025
Dec 24, 2024

Repository files navigation

UI Ingredients

Headless component library for Svelte powered by zag

Installation

npm install ui-ingredients

Usage

<script>
  import {Dialog, Portal} from 'ui-ingredients';
  import {XCloseIcon} from '$lib/icons';
  import {Button} from '$lib/ui';
</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>

Packages

Credits

Documentation

Browse the documentation for more information on how to use UI Ingredients

MadeWithSvelte.com shield