BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/lyse/modal

modal

lyse/modal
FreeComponent

lyse publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by lyse on their own page — this is the component running, not a screenshot of it.

Install it

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

Source

registry/new-york/ui/modal/modal.tsxui.getlyse.com/r/modal.json · first 6 KB
1import * as React from "react"
2import * as DialogPrimitive from "@radix-ui/react-dialog"
3import { cva, type VariantProps } from "class-variance-authority"
4import { X } from "lucide-react"
5
6import { cn } from "@/lib/utils"
7import "./modal.css"
8
9/* ------------------------------------------------------------------ */
10/* CVA */
11/* ------------------------------------------------------------------ */
12
13const modalContentVariants = cva(
14 "modal-content fixed left-1/2 top-1/2 z-50 -translate-x-1/2 -translate-y-1/2 flex flex-col items-start animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",
15 {
16 variants: {
17 size: {
18 sm: "w-[20rem]",
19 md: "w-[25rem]",
20 lg: "w-[35rem]",
21 },
22 },
23 defaultVariants: {
24 size: "md",
25 },
26 }
27)
28
29const modalIconVariants = cva(
30 "modal-icon flex items-center justify-center shrink-0 size-[var(--layout-size-lg)] rounded-[var(--layout-radius-full)] [&_svg]:size-[var(--layout-size-xs)]",
31 {
32 variants: {
33 variant: {
34 brand: "modal-icon-brand",
35 destructive: "modal-icon-destructive",
36 success: "modal-icon-success",
37 warning: "modal-icon-warning",
38 },
39 },
40 defaultVariants: {
41 variant: "brand",
42 },
43 }
44)
45
46/* ------------------------------------------------------------------ */
47/* Modal */
48/* ------------------------------------------------------------------ */
49
50function Modal({
51 ...props
52}: React.ComponentProps<typeof DialogPrimitive.Root>) {
53 return <DialogPrimitive.Root data-slot="modal" {...props} />
54}
55
56/* ------------------------------------------------------------------ */
57/* ModalTrigger */
58/* ------------------------------------------------------------------ */
59
60function ModalTrigger({
61 ...props
62}: React.ComponentProps<typeof DialogPrimitive.Trigger>) {
63 return <DialogPrimitive.Trigger data-slot="modal-trigger" {...props} />
64}
65
66/* ------------------------------------------------------------------ */
67/* ModalOverlay */
68/* ------------------------------------------------------------------ */
69
70function ModalOverlay({
71 className,
72 ...props
73}: React.ComponentProps<typeof DialogPrimitive.Overlay>) {
74 return (
75// … truncated

What it pulls in

npm packages

  • class-variance-authority
  • @radix-ui/react-dialog
  • lucide-react

Other registry items

  • https://ui.getlyse.com/r/lyse-tokens.json

Files it writes

  • registry/new-york/ui/modal/modal.tsx
  • registry/new-york/ui/modal/modal.css

Facts

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

Go to the source

Docs on lyse ui.getlyse.com lyse-labs/lyse-registry on GitHub Raw registry item This item as JSON

More from lyse

All 33 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
action-cardaction-cardlyseComponentsFreeno deps · 2 files
alertalertlyseComponentsFree2 deps · 2 files
alert-dialogalert-dialoglyseComponentsFree2 deps · 2 files
avataravatarlyseComponentsFree3 deps · 2 files
badgebadgelyseComponentsFree1 dep · 2 files
banner-infobanner-infolyseComponentsFree2 deps · 2 files
breadcrumbbreadcrumblyseComponentsFree2 deps · 2 files
buttonbuttonlyseComponentsFree2 deps · 2 files
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