Dialog

Installation

npx shadcn@latest add https://ui.timkit.cn/r/dialog.json

Usage

import { Dialog } from "@/components/ui/dialog"

Examples

Dialog · Overlay Pattern
Loading preview...
Dialog · Overlay Pattern
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Project name
Loading preview...
Dialog · Email
Loading preview...
Dialog · Send feedback
Loading preview...
Dialog · Why did you give this rating?
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Full name
Loading preview...
Dialog · Email
Loading preview...
Dialog · Invite via email
Loading preview...
Dialog · Name on card
Loading preview...
Dialog · Name on card
Loading preview...
Dialog · Essential
Loading preview...
Dialog · First name
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Interactive State
Loading preview...

Structured API

Component

dialog

Logic

zag / dialog

Runtime Frameworks

ReactVueWeappHTML

Supported Platforms

WebWeChat Mini Program
Configuration
PropTypeDefaultDescription
logic.provider*
enum (zag | native | none)
zagState and interaction provider used by this component.
logic.machine
string
dialogUnderlying state machine identifier when provider is zag.
platforms*
array
Web, WeChat Mini ProgramPlatforms officially supported by this schema.
frameworks*
array
React, Vue, Weapp, HTMLFramework demos/code currently available in registry files.
dependencies
array
@timui/core, @zag-js/reactRuntime package dependencies required by this registry item.
optionalPeerDependencies
array
-Optional peer dependencies used by this registry item.
registryDependencies
array
use-machineDependent Timkit registry components/hook entries.
Props
PropTypeDefaultDescription
open
boolean
-The controlled open state.
defaultOpen
boolean
-The default open state.
modal
boolean
trueWhether the dialog is modal.
Events
PropTypeDefaultDescription
onOpenChange
event
-Event handler called when the open state changes.
Slots
PropTypeDefaultDescription
default
slot
-The dialog content
Parts
PropTypeDefaultDescription
root*
root
-The dialog container
trigger
part
-The toggle button
portal
part
-The portal container
overlay
part
-The dimmed background
content
part
-The dialog content
header
part
-The dialog header
footer
part
-The dialog footer
title
part
-The dialog title
description
part
-The dialog description
close
part
-The close button
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.

Extended notes are not available for this component yet.

Dialog

Installation

npx shadcn@latest add https://ui.timkit.cn/r/dialog.json

Usage

import { Dialog } from "@/components/ui/dialog"

Examples

Dialog · Overlay Pattern
Loading preview...
Dialog · Overlay Pattern
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Project name
Loading preview...
Dialog · Email
Loading preview...
Dialog · Send feedback
Loading preview...
Dialog · Why did you give this rating?
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Full name
Loading preview...
Dialog · Email
Loading preview...
Dialog · Invite via email
Loading preview...
Dialog · Name on card
Loading preview...
Dialog · Name on card
Loading preview...
Dialog · Essential
Loading preview...
Dialog · First name
Loading preview...
Dialog · Dismissible
Loading preview...
Dialog · Interactive State
Loading preview...

Structured API

Component

dialog

Logic

zag / dialog

Runtime Frameworks

ReactVueWeappHTML

Supported Platforms

WebWeChat Mini Program
Configuration
PropTypeDefaultDescription
logic.provider*
enum (zag | native | none)
zagState and interaction provider used by this component.
logic.machine
string
dialogUnderlying state machine identifier when provider is zag.
platforms*
array
Web, WeChat Mini ProgramPlatforms officially supported by this schema.
frameworks*
array
React, Vue, Weapp, HTMLFramework demos/code currently available in registry files.
dependencies
array
@timui/core, @zag-js/reactRuntime package dependencies required by this registry item.
optionalPeerDependencies
array
-Optional peer dependencies used by this registry item.
registryDependencies
array
use-machineDependent Timkit registry components/hook entries.
Props
PropTypeDefaultDescription
open
boolean
-The controlled open state.
defaultOpen
boolean
-The default open state.
modal
boolean
trueWhether the dialog is modal.
Events
PropTypeDefaultDescription
onOpenChange
event
-Event handler called when the open state changes.
Slots
PropTypeDefaultDescription
default
slot
-The dialog content
Parts
PropTypeDefaultDescription
root*
root
-The dialog container
trigger
part
-The toggle button
portal
part
-The portal container
overlay
part
-The dimmed background
content
part
-The dialog content
header
part
-The dialog header
footer
part
-The dialog footer
title
part
-The dialog title
description
part
-The dialog description
close
part
-The close button
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.

Extended notes are not available for this component yet.