Skip to content

Fluid Card

The FluidCard is a layout primitive that supports layout animations and expandable content using Framer Motion's layout prop.

Usage

tsx
import { FluidCard } from '@peacock-ui/core'

function Example() {
  return (
    <FluidCard
      title="Architecture"
      description="Deep dive into our motion system"
      expandedContent={
        <div className="space-y-4">
          <p>Learn how we use spring physics to create natural-feeling interactions.</p>
          <ul className="list-disc pl-4">
            <li>Spring physics basics</li>
            <li>Layout transitions</li>
            <li>Gesture recognition</li>
          </ul>
        </div>
      }
    />
  )
}

Props

PropTypeDefaultDescription
titlestring-The main heading of the card.
descriptionstring-A short summary shown below the title.
expandedContentReactNode-Content revealed when the card is clicked.
classNamestring-Additional CSS classes for the container.

Released under the MIT License.