LayerwiseLayerwise
  • Features
  • Pricing
  • Templates
  • Docs
DownloadDownload
FeaturesPricingTemplatesDocsAI Website BuilderVibe CodingPersonal Software
DownloadDownload
  1. Glossary
  2. /
  3. Layout

Card

Also called card component or content card

A bordered, rounded container that groups one item’s image, title, details, and actions so it can sit in a list or grid with others.

type Stay = {
  id: string;
  name: string;
  photo: string;
  location: string;
  rating: number;
  price: number;
};

export function StayCard({ stay }: { stay: Stay }) {
  return (
    <article className='relative flex h-full flex-col overflow-hidden rounded-xl border bg-background shadow-sm transition-shadow hover:shadow-md'>
      <img
        src={stay.photo}
        alt=''
        className='aspect-16/10 w-full object-cover'
      />
      <div className='flex flex-1 flex-col gap-1 p-4'>
        <h3 className='font-semibold'>
          {/* The ::after layer stretches this link over the whole card. */}
          <a
            href={`/stays/${stay.id}`}
            className='after:absolute after:inset-0'
          >
            {stay.name}
          </a>
        </h3>
        <p className='text-sm text-muted-foreground'>
          {stay.location} · ★ {stay.rating}
        </p>
        {/* mt-auto pins the actions to the bottom when titles wrap. */}
        <div className='mt-auto flex items-center justify-between pt-3'>
          <span className='font-medium'>
            ${stay.price}
            <span className='font-normal text-muted-foreground'> night</span>
          </span>
          {/* relative z-10 lifts the button above the stretched link. */}
          <button
            type='button'
            className='relative z-10 rounded-full bg-primary px-4 py-2 text-sm font-medium text-primary-foreground'
          >
            Book
          </button>
        </div>
      </div>
    </article>
  );
}
Design a listing card: a 16:10 image with 12px rounded top corners, a 16px semibold title, a meta row with location and rating in muted gray, and a bottom row with the nightly price and a "Book" button. Use a 1px border and a soft shadow that grows slightly on hover, make the whole card clickable through the title link, and keep cards in a row the same height.

Paste into Layerwise or any AI coding tool.

What is Card?

A card is a self-contained preview of one thing: a product, a listing, an article, a project. The usual anatomy, top to bottom, is media (an image or thumbnail), a title, meta information (price, date, author, rating), and actions (a button, a link, a favorite icon). The border, background, and shadow make the group read as one object.

Naming the parts makes prompts precise: "Make the card media 16:9 with rounded top corners", "Move the price into the card meta", or "Show the card actions only on hover". Cards in a row should share the same height, so pin the actions to the bottom when titles wrap to different lengths.

If the whole card should be clickable, make the title a real link and stretch its click area over the card with an ::after pseudo-element set to position: absolute; inset: 0. Give any other buttons on the card position: relative and a z-index so they stay clickable on top of that area, and screen readers still hear one clear link.

Related terms

All terms

Bento grid

A grid of rounded tiles in mixed sizes that fit together like a bento lunch box, often used to show several features at once.

Drop shadow

A shadow cast behind an element to make it look raised off the page, with larger, softer shadows signaling higher elevation.

Hover effect

A visual change, such as a lift, glow, or zoom, that happens when the mouse pointer moves over an element to show it can be clicked.

Border radius

The CSS property that rounds an element’s corners, from a slight softening to a full pill or circle.

Build it with Layerwise

Describe your app, watch it run in a live preview, and publish it with a database, storage, and sign-in built in.

DownloadDownloadRead the docs
LayerwiseLayerwise

Build full-stack web apps in minutes with AI.

Product

  • Features
  • Pricing
  • Download
  • Templates

Solutions

  • AI Website Builder
  • Vibe Coding
  • Personal Software

Resources

  • Documentation
  • Changelog
  • Blog
  • Vibe Coding Glossary
  • llms.txt
  • llms-full.txt

Company

  • About
  • Contact

Legal

  • Privacy
  • Analytics Privacy
  • Terms
  • Security
  • Abuse

© 2026 Layerwise. All rights reserved.

Entrances & exits

  • Fade in
  • Slide in
  • Scale in
  • Pop in
  • Blur in
  • Reveal animation
  • Enter and exit animations

Timing & sequencing

  • Duration
  • Delay
  • Keyframes
  • Tweening
  • Stagger
  • Orchestration
  • Fill mode
  • Stepped animation
  • Looping animation
  • Yoyo animation

Easing

  • Easing
  • Linear easing
  • Ease-in
  • Ease-out
  • Ease-in-out
  • Cubic-bezier
  • Asymmetric easing
  • Overshoot easing

Springs & physics

  • Spring animation
  • Stiffness
  • Damping
  • Mass
  • Bounce
  • Velocity
  • Momentum
  • Interruptible animation
  • Rubber-banding

Transforms

  • Translate
  • Scale
  • Rotate
  • Skew
  • 3D flip
  • Perspective
  • Transform origin
  • Origin-aware animation

State transitions

  • Crossfade
  • Morph
  • Shared element transition
  • Layout animation
  • Height auto animation
  • Direction-aware transition
  • Continuity transition
  • Page transition
  • View Transitions API

Scroll effects

  • Scroll reveal
  • Scroll-driven animation
  • Parallax scrolling
  • Scrollytelling
  • Scroll pinning
  • Horizontal scroll section
  • Scroll progress bar
  • Scroll snap
  • Smooth scrolling

Interaction feedback

  • Hover effect
  • Press feedback
  • Ripple effect
  • Shake animation
  • Hold to confirm
  • Drag gesture
  • Drag to reorder
  • Swipe to dismiss
  • Pull to refresh
  • Magnetic button
  • Custom cursor
  • 3D tilt card
  • Spotlight card

Text effects

  • Typewriter effect
  • Text scramble
  • Split text animation
  • Text morph
  • Rotating words
  • Gradient text
  • Shimmer text
  • Number ticker
  • Tabular numbers
  • Underline animation

Loops & ambient motion

  • Marquee
  • Pulse animation
  • Float animation
  • Orbit animation
  • Idle animation
  • Particle background
  • Border beam
  • Confetti
  • Animated gradient

Visual effects

  • Blur
  • Clip-path
  • Mask
  • Before/after slider
  • SVG line drawing
  • Lottie animation

Motion principles

  • Purposeful animation
  • Anticipation
  • Follow-through
  • Squash and stretch
  • Perceived performance
  • Frequency of use
  • Spatial consistency
  • Reduced motion

Animation performance

  • Frame rate (FPS)
  • Jank
  • GPU acceleration
  • will-change
  • Layout thrashing

Layout

  • Hero section
  • Above the fold
  • Sticky header
  • Sidebar
  • Bento grid
  • Card
  • Flexbox
  • CSS Grid
  • Padding vs margin
  • Responsive design
  • Container
  • Masonry layout
  • Split screen
  • Z-index
  • Overflow

Components

  • Button variants
  • Modal
  • Drawer
  • Popover
  • Tooltip
  • Dropdown menu
  • Context menu
  • Toast notification
  • Tabs
  • Segmented control
  • Accordion
  • Carousel
  • Command palette
  • Combobox
  • Toggle switch
  • Checkbox
  • Radio button
  • Date picker
  • Breadcrumb
  • Pagination
  • Infinite scroll
  • Badge
  • Avatar stack
  • Empty state
  • Skeleton screen
  • Spinner
  • Progress bar
  • Data table
  • Stepper
  • Floating label
  • Inline validation
  • Alert banner
  • Tag input

States & patterns

  • Interaction states
  • Focus ring
  • Loading state
  • Optimistic UI
  • Debounce
  • Lazy loading
  • Dark mode
  • Micro-interaction
  • Affordance
  • Undo
  • Drag and drop
  • Keyboard shortcut

Visual styles

  • Glassmorphism
  • Liquid glass
  • Neumorphism
  • Claymorphism
  • Neo-brutalism
  • Skeuomorphism
  • Flat design
  • Mesh gradient
  • Aurora background
  • Grain texture
  • Glow effect
  • Drop shadow
  • Border radius
  • Grid background
  • Typographic hierarchy
  • Accent color
  • Color contrast

Vibe coding & AI

  • Vibe coding
  • Prompt
  • Context window
  • Token
  • AI agent
  • Tool call
  • Hallucination
  • Diff
  • Live preview
  • Checkpoint
  • Git commit
  • Deploy
  • Frontend and backend
  • API
  • Database
  • Rules file
  • MCP
  • Plan mode
  • Visual edit
Mountains and pine trees reflected in a still lake

Cabin by the lake

Lake Louise ·4.9

$240 nightBook