Dialog

A modal panel on a spined frame that tears in over a dimmed page, with its answers on keys below.

Component

Dialog belongs to the Overlays group in the CyberSpec catalog. It uses @ui-sdk/react/dialog.

Installation

Use a React 19 project with shadcn configured. Render the installed components inside the Cyber root, and import your global stylesheet in the app entry point.

bunx --bun shadcn@latest add https://www.cyberspec.dev/r/dialog.json

Example

"use client"

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

export default function DialogDemo() {
  return (
    <>
      <Dialog
        trigger="Wipe deck"
        title="Wipe this deck and return it to factory firmware?"
        description="Installed daemons, saved routes and seven unassigned upgrade points are erased. This can't be undone from the field."
        confirm="Wipe"
        cancel="Back"
      />
    </>
  )
}

Install this example

bunx --bun shadcn@latest add https://www.cyberspec.dev/r/dialog-demo.json

Resources

View as Markdown