Dialog (Base UI)
iconiq-ui/b-dialogFreeComponent
Dialog with the same exported Iconiq parts layered over Base UI primitives, preserving the original dialog springs while using the softer alert-dialog card styling and overlay treatment.
Install it
npx shadcn@latest add https://www.iconiqui.com/r/b-dialog.jsonSource
1"use client";23import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";4import { Slot } from "@radix-ui/react-slot";5import { X } from "lucide-react";6import {7 MotionConfig,8 motion,9 type Transition,10 useReducedMotion,11 type Variants,12} from "motion/react";13import * as React from "react";1415import { cn } from "@/lib/utils";1617const controlCornerClassName =18 "rounded-lg supports-[corner-shape:squircle]:corner-squircle supports-[corner-shape:squircle]:rounded-[11px]";1920const surfaceCornerClassName =21 "rounded-lg supports-[corner-shape:squircle]:corner-squircle supports-[corner-shape:squircle]:rounded-[12px]";2223const dialogThemeClassName =24 "[--dlg-surface:var(--popover,#ffffff)] [--dlg-foreground:var(--popover-foreground,#111111)] [--dlg-border:var(--border,#e3e7ec)] [--dlg-ring:var(--ring,rgba(17,17,17,0.16))] [--dlg-muted-foreground:var(--muted-foreground,#6d7480)] [--dlg-muted:var(--muted,#f5f7fa)] [--dlg-destructive:var(--destructive,#dc2626)] [--dlg-destructive-foreground:var(--destructive-foreground,#ffffff)] [--color-accent:var(--dlg-muted)] [--color-accent-foreground:var(--dlg-foreground)] dark:[--dlg-surface:var(--popover,#0a0a0a)] dark:[--dlg-foreground:var(--popover-foreground,#f6f3ec)] dark:[--dlg-border:var(--border,#2b2a25)] dark:[--dlg-ring:var(--ring,rgba(246,243,236,0.18))] dark:[--dlg-muted-foreground:var(--muted-foreground,#9a958a)] dark:[--dlg-muted:var(--muted,#1a1a18)] dark:[--dlg-destructive:var(--destructive,#f87171)] dark:[--dlg-destructive-foreground:var(--destructive-foreground,#111111)]";2526const dialogContentMaxHeightClassName =27 "max-h-[min(90svh,calc(100svh-env(safe-area-inset-top,0px)-env(safe-area-inset-bottom,0px)-2rem))] overflow-y-auto";2829const dialogContentBaseClassName = cn(30 surfaceCornerClassName,31 "relative flex min-h-0 transform-gpu flex-col gap-5 border border-[color:color-mix(in_oklch,var(--dlg-border),transparent_25%)] bg-[color:color-mix(in_oklch,var(--dlg-surface),transparent_4%)] p-6 text-[color:var(--dlg-foreground)] shadow-[0_32px_120px_rgba(15,23,42,0.18)] outline-none supports-[backdrop-filter]:bg-[color:color-mix(in_oklch,var(--dlg-surface),transparent_8%)] sm:p-7"32);3334const dialogContentSizeClassNames = {35 sm: "w-[min(100%,28rem)] max-w-md",36 default: "w-[min(100%,34rem)] max-w-xl",37 lg: "w-[min(100%,42rem)] max-w-2xl",38 full: "w-[min(100%,calc(100vw-2rem))] max-w-none",39} as const;4041type DialogContentSize = keyof typeof dialogContentSizeClassNames;4243// … truncated
What it pulls in
npm packages
Files it writes
More from Iconiq UI
All 119 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | Iconiq UI | Components | Free | 2 deps | |
| AI Inputai-input | Iconiq UI | Components | Free | 3 deps | |
| Alertalert | Iconiq UI | Components | Free | 2 deps | |
| Avataravatar | Iconiq UI | Components | Free | 3 deps | |
| Accordion (Base UI)b-accordion | Iconiq UI | Components | Free | 2 deps | |
| Alert Dialog (Base UI)b-alert-dialog | Iconiq UI | Components | Free | 3 deps | |
| Autocomplete (Base UI)b-autocomplete | Iconiq UI | Components | Free | 3 deps | |
| Avatar (Base UI)b-avatar | Iconiq UI | Components | Free | 2 deps |
