GitHub

/ dialog

Dialog

@kumiki/headless/dialog

Svelte 5 attachments for Dialog — trigger / content / overlay / close + focus-trap + dismissable + sibling inert.

This component, layer by layer

Styled, copy-paste presets (preview). Run pnpm kumiki add to drop the source into your project, then edit freely.

Live preview

Live preview…

Install
pnpm add @kumiki/atelier
Modal dialog (Tailwind v4)
<script lang="ts">
  import { Tailwind as Dialog } from '@kumiki/atelier/dialog';
</script>

<Dialog.Root>
  <Dialog.Trigger>Edit profile</Dialog.Trigger>
  <Dialog.Overlay />
  <Dialog.Content>
    <Dialog.Title>Edit profile</Dialog.Title>
    <Dialog.Description>Update your account details.</Dialog.Description>
    <!-- form goes here -->
    <Dialog.Close>Close</Dialog.Close>
  </Dialog.Content>
</Dialog.Root>
Vanilla CSS variant
<script lang="ts">
  import { Vanilla as Dialog } from '@kumiki/atelier/dialog';
</script>

<Dialog.Root>
  <Dialog.Trigger>Open</Dialog.Trigger>
  <Dialog.Overlay />
  <Dialog.Content>
    <Dialog.Title>Hello</Dialog.Title>
    <Dialog.Close />
  </Dialog.Content>
</Dialog.Root>

/ accessibility

Accessibility

axe-core — run on every PR (LTR + RTL × every documented state).

Keyboard

KeyEffect
EscapeClose (when policy allows).
Tab / Shift+TabCycle focus within trap.

Test discipline

  • axe-core — run on every PR (LTR + RTL × every documented state).
  • APG keyboard tests — Playwright, hand-written per pattern.
  • VoiceOver / NVDA — Guidepup nightly schedule.
  • Type-level required names — title / aria-label / aria-labelledby.
Read the W3C ARIA APG pattern ↗