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

Scale

Also called scale transform, scaleX, or scaleY

A CSS transform that draws an element larger or smaller around its transform origin, without pushing neighboring elements.

import { motion } from 'motion/react';

// A press is felt more than seen, so stay close to 1.
const PRESSED_SCALE = 0.97;

export function PlanCard() {
  return (
    <article className='w-72 rounded-2xl border bg-background p-6 shadow-sm transition-transform duration-200 ease-[cubic-bezier(0.23,1,0.32,1)] hover:scale-103'>
      <h3 className='font-semibold'>Pro</h3>
      <p className='mt-1 text-sm text-muted-foreground'>
        Unlimited projects, custom domains, and priority builds.
      </p>
      {/* whileTap also fires while Enter is held on the focused button. */}
      <motion.button
        type='button'
        whileTap={{ scale: PRESSED_SCALE }}
        transition={{ duration: 0.1, ease: 'easeOut' }}
        className='mt-6 w-full rounded-full bg-primary px-4 py-2 text-sm font-medium text-primary-foreground'
      >
        Upgrade to Pro
      </motion.button>
    </article>
  );
}
Give every button press feedback: scale it to 0.97 while it is pressed with a 100ms ease-out transform transition, and return to 1 on release. Use transform: scale() so surrounding layout never shifts, and make sure keyboard activation with Enter or Space shows the same pressed state.

Paste into Layerwise or any AI coding tool.

What is Scale?

transform: scale(1.1) draws an element 10% larger and scale(0.5) draws it at half size. scaleX() and scaleY() stretch one axis at a time. Everything inside grows with it, including text, borders, and shadows, and it grows from the transform origin, which is the center unless you change it.

The layout box keeps its original size, so neighbors stay put and a scaled-up element can overlap them. That makes scale ideal for small, quick feedback: a button shrinking to 0.97 while pressed, a card growing to 1.03 on hover, or a menu popping in from 0.95.

Avoid scaling from 0: elements that grow out of nothing feel abrupt, so start at 0.9 to 0.95 and add a fade. Large scale-ups of text can look slightly soft mid-animation, and animating width or height instead forces layout work on every frame.

Often confused with

Scale in
Scale-in is an entrance animation that grows an element into view. Scale is the transform it uses, and it works for any size change.

Related terms

All terms

Transform origin

The point an element rotates and scales around. It defaults to the center, and moving it changes where a transform seems to start.

Press feedback

A quick visual response, usually a slight shrink, that shows a button registered the press the moment a finger or mouse button goes down.

Scale in

An entrance animation where an element grows from slightly smaller than its final size to full size while it fades in.

Translate

A CSS transform that moves an element along the x or y axis while the layout around it stays exactly where it was.

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

scale(1.4)

Neighbors stay put