BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/interlace-ui/dialog

Dialog

interlace-ui/dialog
FreeComponent

A MODAL dialog: it traps focus, dismisses on Escape and on an outside click, marks the rest of the page inert while open, and restores focus to the trigger on close. Base UI owns all of that, which is exactly why this file never says so anywhere else — and…

Install it

npx shadcn@latest add https://ds.interlace.tools/r/dialog.json

Source

registry/interlace-ui/dialog.tsxds.interlace.tools/r/dialog.json · first 6 KB
1'use client';
2
3import * as React from 'react';
4
5// @interlace/dialog v1.4.0 — Interlace design system.
6// Docs, props and live preview: https://ds.interlace.tools/c/dialog
7// What changed since: https://ds.interlace.tools/c/dialog#history
8// Generated banner — keep it, the upgrade diff reads this version.
9
10/**
11 * @interlace/ui — Dialog (gold-standard reference for the interlace-component skill)
12 *
13 * A MODAL dialog: it traps focus, dismisses on Escape and on an outside click,
14 * marks the rest of the page inert while open, and restores focus to the
15 * trigger on close. Base UI owns all of that, which is exactly why this file
16 * never says so anywhere else — and why a reader searching for "modal I can
17 * close with escape" could not find it. Behaviour a consumer relies on has to
18 * be written down in the file they install, not left implicit in a dependency.
19 *
20 * This file is the canonical example of the portable component-modeling floor.
21 * Every rule R1–R26 from `skills/interlace-component/SKILL.md` that is applicable
22 * to a Dialog primitive is illustrated here.
23 *
24 * | Rule | Concept | Where in this file |
25 * | ---- | -------------------------------- | ------------------------------------------------------------- |
26 * | R4 | Extends native el + JSDoc | `React.ComponentProps<typeof BaseDialog.*>` on every export |
27 * | R5 | data-testid type-required | Inherited via consumer-supplied `data-testid` on `...props` |
28 * | R6 | data-slot on every named part | `data-slot="dialog"` / `"dialog-trigger"` / `"dialog-portal"` / `"dialog-close"` / `"dialog-overlay"` / `"dialog-popup"` |
29 * | R7 | className merged + ...rest + ref | `cn(...)` merged className; `{...props}` spread to root |
30 * | R8 | No `isXxx` prefix on booleans | All boolean props inherited from Base UI use the no-`is` form |
31 * | R11 | Composition over prop-drilling | DialogContent / DialogHeader / DialogFooter / DialogTitle / DialogDescription compound parts |
32 * | R12 | Reuse primitives — don't wrap | XIcon from lucide-react is slotted, not wrapped in a `DialogCloseIcon` |
33 * | R13 | Build with the ecosystem | `@base-ui/react/dialog` provides keyboard / focus / portal / ARIA |
34 * | R14 | Controlled + uncontrolled | Inherited from `BaseDialog.Root` — `open` + `onOpenChange` + `defaultOpen` |
35// … truncated

Facts

Registry
interlace-ui
Type
registry:ui
Access
Free
Files written
0
Licence
the repository states none
First indexed
2026-08-12
Last confirmed
today

Go to the source

ds.interlace.tools Raw registry item This item as JSON

More from interlace-ui

All 140 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
A11y Startera11y-starterinterlace-uiComponentsFreeno deps
Accordionaccordioninterlace-uiComponentsFreeno deps
Alertalertinterlace-uiComponentsFreeno deps
Alert Dialogalert-dialoginterlace-uiComponentsFreeno deps
Animated Gradient Textanimated-gradient-textinterlace-uiComponentsFreeno deps
Animated Grid Patternanimated-grid-patterninterlace-uiComponentsFreeno deps
Animated Listanimated-listinterlace-uiComponentsFreeno deps
Article Cardarticle-cardinterlace-uiComponentsFreeno deps
BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

BlockDex

Built by

Kynth Studios

the studio behind StoreReady, ToolDrift and BreachProbe

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex