BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/poyraz/modal

Modal

poyraz/modal
FreeComponent

Poyraz Soft Glass modal component with standardized floating and overlay behavior.

Install it

npx shadcn@latest add https://ui.poyrazavsever.com/r/modal.json

Source

registry/poyraz/ui/phase6/molecules/modal.tsxui.poyrazavsever.com/r/modal.json · first 6 KB
1"use client";
2
3import * as React from "react";
4import * as DialogPrimitive from "@radix-ui/react-dialog";
5import { X } from "lucide-react";
6import { cva, type VariantProps } from "class-variance-authority";
7
8import { cn } from "@/lib/utils";
9import {
10 overlaySurfaceVariants,
11 overlayVariants,
12 type OverlayProps,
13 type OverlaySurfaceProps,
14} from "@/components/ui/recipes";
15
16/* ================================================================== */
17/* MODAL — opinionated wrapper around Radix Dialog */
18/* Difference from Dialog: */
19/* • size variants (sm / default / lg / full) */
20/* • centered by default, optional top-aligned */
21/* • built-in close icon */
22/* ================================================================== */
23
24const modalContentVariants = cva(
25 [
26 "fixed z-50 grid gap-4 p-5",
27 "data-[state=open]:animate-in data-[state=closed]:animate-out",
28 "data-[state=open]:fade-in-0 data-[state=closed]:fade-out-0",
29 "data-[state=open]:[--poyraz-enter-scale:0.98] data-[state=closed]:[--poyraz-exit-scale:0.98]",
30 "motion-reduce:[--poyraz-enter-scale:1] motion-reduce:[--poyraz-exit-scale:1] motion-reduce:[--poyraz-enter-translate-x:0] motion-reduce:[--poyraz-enter-translate-y:0] motion-reduce:duration-100",
31 ].join(" "),
32 {
33 variants: {
34 size: {
35 sm: "w-full max-w-xs",
36 default: "w-full max-w-sm",
37 lg: "w-full max-w-lg",
38 xl: "w-full max-w-2xl",
39 full: "w-[calc(100vw-2rem)] h-[calc(100vh-2rem)]",
40 },
41 position: {
42 center:
43 "left-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",
44 top: "left-[50%] top-[10%] translate-x-[-50%] data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[5%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[5%]",
45 },
46 },
47 defaultVariants: {
48 size: "default",
49 position: "center",
50 },
51 },
52);
53
54/* ── Root ─────────────────────────────────────────────────────────── */
55
56const Modal = DialogPrimitive.Root;
57
58// … truncated

What it pulls in

npm packages

  • @radix-ui/react-dialog@^1.1.15
  • class-variance-authority@^0.7.1
  • lucide-react@^0.574.0

Other registry items

  • @poyraz/poyraz-utils
  • @poyraz/poyraz-theme
  • @poyraz/poyraz-recipes

Files it writes

  • registry/poyraz/ui/phase6/molecules/modal.tsx

Facts

Registry
poyraz
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

ui.poyrazavsever.com poyrazavsever/poyraz-ui on GitHub Raw registry item This item as JSON

More from poyraz

All 71 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionpoyrazComponentsFree2 deps
AlertalertpoyrazComponentsFree2 deps
Announcement Barannouncement-barpoyrazComponentsFree2 deps
AutocompleteautocompletepoyrazComponentsFree1 dep
AvataravatarpoyrazComponentsFree2 deps
BadgebadgepoyrazComponentsFree1 dep
Bg Patternbg-patternpoyrazComponentsFreeno deps
BreadcrumbbreadcrumbpoyrazComponentsFree1 dep
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex