Dialog

Displays content in a modal overlaid onto the primary content.
Dialog HeaderThis is the dialog description.
Dialog CTAs
Properties
No properties to configure
Example
Source Code
Installation
"use client";

import React from "react";
import { Dialog } from "@/ui/components/Dialog";

function DialogExample() {
  return (
    <Dialog open={false} onOpenChange={(open: boolean) => {}}>
      <Dialog.Content>
        <div className="flex w-96 flex-col items-start gap-6 px-6 py-6">
          <div className="flex w-full flex-col items-start gap-1">
            <span className="text-heading-3 font-heading-3 text-default-font">
              Dialog Header
            </span>
            <span className="text-body font-body text-default-font">
              This is the dialog description.
            </span>
          </div>
          <div className="flex w-full grow shrink-0 basis-0 flex-col items-end justify-center gap-2">
            <span className="text-body font-body text-default-font">
              Dialog CTAs
            </span>
          </div>
        </div>
      </Dialog.Content>
    </Dialog>
  );
}

export default DialogExample;

Props

Dialog
Content
Prop
Type
Default
Additional info
children
React.ReactNode
open
boolean
Whether the dialog is currently opened.
onOpenChange
(open: boolean) => void
Handler called when opened or closed.

Examples

Basics

Use open and onOpenChange props to control the open state.