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 Popover#
A popover that transforms from its trigger into the content using layout animations. It visually morphs instead of appearing as a separate element.
Examples#
Morphing popover basic#
Morphing popover with custom transition variants#
You can pass a custom transition and variants to the popover with the variants and transition props.
Morphing popover with textarea#
Installation#
npx shadcn@latest add "https://components.dylanwlim.com/c/morphing-popover.json"
Component API#
MorphingPopover#
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | Required | The content of the popover (trigger and content) |
transition | Transition | { type: 'spring', bounce: 0.1, duration: 0.4 } | Custom transition settings for the animations |
defaultOpen | boolean | false | Whether the popover is open by default |
open | boolean | undefined | Controlled open state |
onOpenChange | (open: boolean) => void | undefined | Callback fired when open state changes |
variants | Variants | undefined | Custom variants for the animation |
className | string | undefined | Additional CSS classes |
MorphingPopoverTrigger#
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | Required | The trigger element content |
asChild | boolean | false | Whether to merge props onto the child element |
className | string | undefined | Additional CSS classes |
MorphingPopoverContent#
| Prop | Type | Default | Description |
|---|---|---|---|
children | React.ReactNode | Required | The content to display in the popover |
className | string | undefined | Additional CSS classes |
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