k8ordo
  • UI
  • Form
  • State
  • Router
  • Static
  • Server
Switch to dark mode
  • Get Started
  • Theming
  • i18n
  • Components
  • Hooks
  • Helpers
  • AI
Open navigation
Buttons
  • Button
  • IconButton
Navigation
  • Anchor
  • Tabs
  • Breadcrumb
  • Pagination
Forms
  • TextField
  • Textarea
  • NumberField
  • Select
  • Checkbox
  • CheckboxCard
  • CheckboxGroup
  • Switch
  • PasswordInput
  • Radio
  • RadioCard
  • Autocomplete
  • Slider
  • FileField
  • FormControl
  • Form
Data Display
  • Accordion
  • Avatar
  • Badge
  • Card
  • Code
  • Table
  • Heading
Feedback
  • Alert
  • Skeleton
  • Spinner
  • Toast
  • Progress
Overlays
  • Dialog
  • Drawer
  • Modal
  • Popover
  • DropdownMenu
  • Tooltip
  • ListBox
Layout
  • Stack
  • Grid
  • Separator
  • ScrollLinked
Media
  • Icons
k8ordo

React libraries that use Baseline features without holding back.

Packages
  • @k8ordo/ui
  • @k8ordo/form
  • @k8ordo/state
  • @k8ordo/router
  • @k8ordo/static
  • @k8ordo/server
UI
  • Get Started
  • Theming
  • i18n
  • Components
  • Hooks
  • Helpers
  • AI Chat
  • Generative UI
  • AI Agents
  • Storybook
Resources
  • GitHub
  • npm

© 2026 k8o — MIT License

Typeset in Noto Sans JP & M PLUS 2

Components

Buttons
  • Button
  • IconButton
Navigation
  • Anchor
  • Tabs
  • Breadcrumb
  • Pagination
Forms
  • TextField
  • Textarea
  • NumberField
  • Select
  • Checkbox
  • CheckboxCard
  • CheckboxGroup
  • Switch
  • PasswordInput
  • Radio
  • RadioCard
  • Autocomplete
  • Slider
  • FileField
  • FormControl
  • Form
Data Display
  • Accordion
  • Avatar
  • Badge
  • Card
  • Code
  • Table
  • Heading
Feedback
  • Alert
  • Skeleton
  • Spinner
  • Toast
  • Progress
Overlays
  • Dialog
  • Drawer
  • Modal
  • Popover
  • DropdownMenu
  • Tooltip
  • ListBox
Layout
  • Stack
  • Grid
  • Separator
  • ScrollLinked
Media
  • Icons

Dialog

A dialog component.

View in Storybook

Import

Usage

Dialog Title

Dialog content here

Basic Usage

Confirmation

Are you sure you want to proceed?

Alert Dialog

Delete Confirmation

Are you sure you want to delete this item? This action cannot be undone.

Props

Dialog.Root

children?
Type: ReactNode
Default: -
id?
Type: string
Default: -
ref?
Type: Ref<HTMLElement>
Default: -
role?
Type: 'dialog'|'alertdialog'
Default: -
tabIndex?
Type: number
Default: -
PropTypeDefault
children?ReactNode-
id?string-
ref?Ref<HTMLElement>-
role?'dialog'|'alertdialog'-
tabIndex?number-

Dialog.Header

onClose
Type: () => void
Default: -
title
Type: ReactNode
Default: -
PropTypeDefault
onClose() => void-
titleReactNode-

Dialog.Content

children?
Type: ReactNode
Default: -
PropTypeDefault
children?ReactNode-
import { Dialog } from '@k8ordo/ui';
import { Modal } from '@k8ordo/ui';
<Dialog.Root>
  <Dialog.Header onClose={handleClose} title="Dialog Title" />
  <Dialog.Content>Dialog content here</Dialog.Content>
</Dialog.Root>
const [isOpen, setIsOpen] = useState(false);

<Button onClick={() => setIsOpen(true)}>
  Open Dialog
</Button>
<Modal
  isOpen={isOpen}
  onClose={() => setIsOpen(false)}
  side="center"
>
  <Dialog.Root>
    <Dialog.Header
      onClose={() => setIsOpen(false)}
      title="Confirmation"
    />
    <Dialog.Content>
      <p>Are you sure you want to proceed?</p>
    </Dialog.Content>
  </Dialog.Root>
</Modal>
const [isOpen, setIsOpen] = useState(false);

<Button onClick={() => setIsOpen(true)}>Delete Item</Button>
<Modal
  isOpen={isOpen}
  onClose={() => setIsOpen(false)}
  side="center"
>
  <Dialog.Root role="alertdialog">
    <Dialog.Header
      onClose={() => setIsOpen(false)}
      title="Delete Confirmation"
    />
    <Dialog.Content>
      <div className="flex flex-col gap-4">
        <p>
          Are you sure you want to delete this item?
          This action cannot be undone.
        </p>
        <div className="flex justify-end gap-2">
          <Button
            color="base"
            onClick={() => setIsOpen(false)}
            variant="outline"
          >
            Cancel
          </Button>
          <Button onClick={() => setIsOpen(false)}>
            Delete
          </Button>
        </div>
      </div>
    </Dialog.Content>
  </Dialog.Root>
</Modal>