Core Components
Number Effects
Interactive Elements
Advanced Effects
Radix UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Base UI Components
- Accordion
- Alert
- Alert Dialog
- Aspect Ratio
- Avatar
- Badge
- Breadcrumb
- Button
- Button Group
- Calendar
- Card
- Carousel
- Chart
- Checkbox
- Collapsible
- Combobox
- Command
- Context Menu
- Data Table
- Date Picker
- Dialog
- Direction
- Drawer
- Dropdown Menu
- Empty
- Field
- Hover Card
- Input
- Input Group
- Input OTP
- Item
- Kbd
- Label
- Menubar
- Native Select
- Navigation Menu
- Pagination
- Popover
- Progress
- Radio Group
- Resizable
- Scroll Area
- Select
- Separator
- Sheet
- Sidebar
- Skeleton
- Slider
- Sonner
- Spinner
- Switch
- Table
- Tabs
- Textarea
- Toast
- Toggle
- Toggle Group
- Tooltip
- Typography
Morphing Dialog#
A dialog that uses layout animations to transition content into a focused view. It supports click-outside and escape key functionalities for closing.
Examples#
Morphing Dialog Basic#
Morphing Dialog Basic 2#
Morphing Dialog Image#
Installation#
npx shadcn@latest add "https://components.dylanwlim.com/c/morphing-dialog.json"
Component API#
MorphingDialog#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | The content of the dialog which could include triggers and content. | |
| transition | Transition | Transition settings from motion for animation effects. |
MorphingDialogTrigger#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | Content of the trigger, typically a string or formatted text. | |
| className | string | Optional CSS class for styling the trigger element. | |
| style | React.CSSProperties | Inline styles for the trigger element. | |
| triggerRef | React.RefObject | Ref to attach to the trigger element, useful for managing focus. |
MorphingDialogContent#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | The content displayed within the dialog when it is open. | |
| className | string | Optional CSS class for styling the content container. | |
| style | React.CSSProperties | Inline styles for the content container. |
MorphingDialogTitle#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | The title content of the dialog. | |
| className | string | Optional CSS class for the title element. | |
| style | React.CSSProperties | Inline styles for the title element. |
MorphingDialogSubtitle#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | The subtitle content of the dialog. | |
| className | string | Optional CSS class for the subtitle element. | |
| style | React.CSSProperties | Inline styles for the subtitle element. |
MorphingDialogDescription#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | The descriptive content of the dialog. | |
| className | string | Optional CSS class for the description container. | |
| disableLayoutAnimation | boolean | false | If true, disables layout animations for the description. |
| variants | Object | Variants for the animation states of the description. |
MorphingDialogImage#
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | Image source URL. | |
| alt | string | Alternative text for the image. | |
| className | string | Optional CSS class for the image element. | |
| style | React.CSSProperties | Inline styles for the image element. |
MorphingDialogClose#
| Prop | Type | Default | Description |
|---|---|---|---|
| children | ReactNode | Optional custom content for the close button, defaults to X icon. | |
| className | string | Optional CSS class for the close button. | |
| variants | Object | Variants for the animation states of the close button. |
Build with DWL Components
Use the copied registry, charts, blocks, and create tools in one place.
Start from the DWL Components create flow and customize from there.
Open DWL Components Create