Modal Cards
Expandable cards that open into full-screen modals
modal-cards-tw
Mountain Vista
Ocean Waves
Forest Path
Customize
Tweak the props liveAnimation
Modal Behavior
Appearance
Props
| Name | Type | Default | Description |
|---|---|---|---|
cards | CardData[] | defaultCards | Array of card data to display (id, imageUrl, title, description, gradientColor) |
className | string | "" | Additional CSS classes for the container |
gradientColor | string | "#6366f1" | Default gradient color for all cards (can be overridden per card) |
animationSpeed | "slow" | "normal" | "fast" | "none" | "normal" | Animation speed preset controlling all animation timings |
springStiffness | number | undefined | Override spring stiffness for animations (affects bounce/snap) |
springDamping | number | undefined | Override spring damping for animations (affects smoothness) |
animationVariant | "scale" | "fade" | "slide" | "scale" | Animation variant for modal entry (scale uses layoutId morphing) |
closeOnBackdropClick | boolean | true | Close modal when clicking the backdrop |
closeOnEscape | boolean | true | Close modal when pressing the Escape key |
showCloseButton | boolean | true | Show close button (×) in the modal |
ariaLabel | string | "Card details modal" | Aria label for modal accessibility |
backdropGradientPosition | string | "50% 10%" | Position of backdrop radial gradient center |
modalClassName | string | "" | Custom CSS classes for the modal container |
backdropClassName | string | "" | Custom CSS classes for the backdrop |
cardsCardData[]Array of card data to display (id, imageUrl, title, description, gradientColor)
Default:
defaultCardsclassNamestringAdditional CSS classes for the container
Default:
""gradientColorstringDefault gradient color for all cards (can be overridden per card)
Default:
"#6366f1"animationSpeed"slow" | "normal" | "fast" | "none"Animation speed preset controlling all animation timings
Default:
"normal"springStiffnessnumberOverride spring stiffness for animations (affects bounce/snap)
Default:
undefinedspringDampingnumberOverride spring damping for animations (affects smoothness)
Default:
undefinedanimationVariant"scale" | "fade" | "slide"Animation variant for modal entry (scale uses layoutId morphing)
Default:
"scale"closeOnBackdropClickbooleanClose modal when clicking the backdrop
Default:
truecloseOnEscapebooleanClose modal when pressing the Escape key
Default:
trueshowCloseButtonbooleanShow close button (×) in the modal
Default:
trueariaLabelstringAria label for modal accessibility
Default:
"Card details modal"backdropGradientPositionstringPosition of backdrop radial gradient center
Default:
"50% 10%"modalClassNamestringCustom CSS classes for the modal container
Default:
""backdropClassNamestringCustom CSS classes for the backdrop
Default:
""