ui/dialog.tsx

sortie · web/src/components/ui/dialog.tsx · typescript · Apache-2.0
ui, UI / Frontend

Accessible dialog wrapper with Base UI and Tailwind animations.

// Source: https://github.com/sortie-ai/sortie | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
import { Dialog as BaseDialog } from "@base-ui/react/dialog";

import { cn } from "@/lib/cn";

import type { ReactNode } from "react";

/** Props of {@link Dialog}. */
export type DialogProps = BaseDialog.Root.Props;

/** Holds the open state of a dialog; control it with `open` and `onOpenChange`. */
export function Dialog(props: DialogProps) {
  return <BaseDialog.Root {...props} />;
}

/** Props of {@link DialogPopup}. */
export interface DialogPopupProps {
  /** Accessible name when the content holds no {@link DialogTitle}. */
  "aria-label"?: string;
  children: ReactNode;
  classNam

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key