ZuzJS UI

ZuzJS

UI

v1.0.71

⌃K

Concepts

Overview

Composition

Layout

Accordion

Alert

Auto Complete

Avatar

Badge

Box

Button

Calendar

Chart

ChatBubble

ChatList

Checkbox

ColorScheme

ContextMenu

CookiesConsent

Cover

Cropper

Crumb

DatePicker

Dialog

Drawer

Fab

Filters

Form

Group

Icon

Image

Input

KeyboardKeys

Label

List

NetworkStatus

Overlay

Pagination

Password

PinInput

ProgressBar

Radio

ScrollView

Slider

Search

SelectTabs

Select

Sheet

Slider

Span

Spinner

Switch

Table

TabView

Text

TextArea

TextWheel

Toast

Tooltip

Treeview

On this page

  • Overview
  • Basic Anatomy

Dialog

Documentation for Dialog component

Dialog

1 <Dialog title="Confirm" message="Are you sure?" action={[{ label: "OK" }, { label: "Cancel" }]} />

Usage

import { Dialog } from "@zuzjs/ui"
<Dialog title="Confirm" message="Are you sure?" action={[{ label: "OK" }, { label: "Cancel" }]} />

Props

Prop
Type
Required
Description
title
string | ReactNode
No
Title text or element
message
string | ReactNode
No
Message text or element
type
ValueOf<typeof DIALOG>
No
Component or input type
action
DialogActionHandler[]
No
action prop
onShow
() => void
No
Callback function triggered when showing
ZuzProps
ZuzProps
—
Shared base props

Examples

Basic Usage

<Dialog title="Confirm" message="Are you sure?" action={[{ label: "OK" }, { label: "Cancel" }]} />

Example 2

<Dialog title="Save Changes?" message="Your edits will be lost" type="warning" action={[{ label: "Save", handler: () => {} }, { label: "Discard" }]} onShow={() => console.log("shown")} />