Morphing Card

As you switch between states the card will change its appearance.

Examples

Basic Implementation of a delete card

This Creation will be chargable on your plan.

Morph Card with custom content

Create New Team

Set up a new team in your organization with customizable permissions and roles.

Installation

npx shadcn@latest add "https://aetherui.in/c/morphing-card.json"

Usage

You can customize the content of the morphing card by passing the following props to the component.

PropTypeDefaultDescription
customIdstringA unique identifier for the morphing card.
childrenReactNode (Optional)Content to be displayed inside the morphing card.
classNamestringAdditional class names to be applied to the morphing card.
iconReactNode (Optional)Pencil IconIcon to be displayed in the morphing card.
iconClassnamestringAdditional class names to be applied to the icon.
titlestring (Optional)Title to be displayed in the morphing card.
descriptionstring (Optional)Description to be displayed in the morphing card.
cancelButtonTextstringCancelText to be displayed on the cancel button.
confirmButtonTextstringCreateText to be displayed on the confirm button.
dialogTitlestring (Optional)Title to be displayed in the confirmation dialog.
dialogDescriptionstring (Optional)Description to be displayed in the confirmation dialog.
dialogCancelTextstringCancelText to be displayed on the cancel button in the confirmation dialog.
dialogConfirmTextstringConfirmText to be displayed on the confirm button in the confirmation dialog.
onConfirmfunction (Optional)Callback function to be called when the confirm button is clicked.
variantenum (Optional)DefaultVariant of the morphing card: Positive | Negative | Default.

Credits

Credit for this component goes to Manu Arora and his amazing framer playlist.