Modal

A low-level overlay primitive for building custom dialog surfaces.

Installation

Copy the command below and run it in your terminal.

bunx @sivir/ui add modal

Usage

Import Modal and use it in your component:

import * as Modal from '$lib/sivir/components/modal';

<Modal.Root open={isOpen}>
  <Modal.Trigger>Open</Modal.Trigger>
  <Modal.Content>
    <Modal.Header>
      <Modal.Title>Title</Modal.Title>
    </Modal.Header>
  </Modal.Content>
</Modal.Root>

Examples

Modal with various structures.

Basic