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

Drop shadow

Also called box shadow or elevation

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

import { Tooltip } from '@base-ui/react/tooltip';

// Elevation: higher things get larger, softer, fainter shadows. Tailwind's
// shadow-xs, shadow-lg, and shadow-2xl work as a card, menu, dialog scale.
export function DocumentCard() {
  return (
    // Two layers: a tight contact shadow plus a wide, faint ambient one.
    <article className='w-72 rounded-xl border bg-background p-5 shadow-[0_1px_2px_rgb(0_0_0/0.06),0_4px_12px_rgb(0_0_0/0.08)]'>
      <h3 className='font-semibold'>Q3 roadmap</h3>
      <p className='mt-1 text-sm text-muted-foreground'>Edited 2 hours ago</p>
      <Tooltip.Root>
        <Tooltip.Trigger className='mt-4 rounded-lg border px-3 py-1.5 text-sm hover:bg-muted'>
          Share
        </Tooltip.Trigger>
        <Tooltip.Portal>
          <Tooltip.Positioner sideOffset={10}>
            {/* drop-shadow follows the arrow's shape; box-shadow would skip it. */}
            <Tooltip.Popup className='relative rounded-md bg-background px-2.5 py-1.5 text-xs drop-shadow-[0_4px_8px_rgb(0_0_0/0.18)]'>
              <Tooltip.Arrow className='data-[side=bottom]:-top-1.5 data-[side=top]:-bottom-1.5 data-[side=top]:rotate-180'>
                <svg
                  width='12'
                  height='6'
                  viewBox='0 0 12 6'
                  className='block fill-background'
                >
                  <path d='M0 6 6 0l6 6z' />
                </svg>
              </Tooltip.Arrow>
              Anyone with the link can view
            </Tooltip.Popup>
          </Tooltip.Positioner>
        </Tooltip.Portal>
      </Tooltip.Root>
    </article>
  );
}
Define a 4-step elevation scale as CSS variables with layered box-shadows (1: 0 1px 2px rgba(0, 0, 0, 0.06); 2: 0 2px 4px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.08); 3: 0 8px 24px -4px rgba(0, 0, 0, 0.14); 4: 0 24px 48px -12px rgba(0, 0, 0, 0.25)). Use level 1 for cards, 3 for dropdowns, and 4 for dialogs, and use filter: drop-shadow() on tooltips so the arrow gets a shadow too.

Paste into Layerwise or any AI coding tool.

What is Drop shadow?

A drop shadow is a darker, blurred copy of an element’s outline, usually offset downward as if light came from above. Small, tight shadows make a card look slightly raised; larger, softer, fainter shadows make a menu or dialog look like it floats. Design systems turn this into a short scale of elevation levels.

CSS offers two tools. box-shadow follows the element’s box and corner radius, supports spread and inset shadows, and stacks several layers for realistic depth. filter: drop-shadow() follows the visible shape instead, including transparent PNGs, SVG icons, and tooltip arrows, but has no spread or inset.

Layer two or three shadows, a tight one for contact plus a wide, faint one for ambient light, for depth that looks natural. Shadows barely show in dark mode, so lighter surfaces and subtle borders do more of the work there.

Often confused with

Glow effect
A glow is centered, colored light that draws attention. A drop shadow is dark and offset, and it shows how high an element sits.

Related terms

All terms

Glow effect

A soft halo of colored light around a button, card, or text, made with colored shadows or a blurred layer behind the element.

Neumorphism

A soft UI style where buttons and cards look pushed out of, or pressed into, a surface of the same color, using light and dark shadows.

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.

Z-index

A CSS property that decides which element appears on top when elements overlap, with higher numbers sitting closer to the viewer.

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

Design review

3 comments · 2 min ago

Elevation 0 · box-shadow