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

Grid background

Also called grid pattern background, dot grid background, or graph paper background

A decorative background of thin grid lines, dots, or stripes, often faded toward the edges, used behind hero sections and product shots.

// Lines drawn in currentColor at 8%, so they follow the theme's text color
// in light and dark mode. For dots, use
// bg-[radial-gradient(currentColor_1px,transparent_1px)] bg-size-[20px_20px].
const GRID =
  'bg-[linear-gradient(to_right,currentColor_1px,transparent_1px),linear-gradient(to_bottom,currentColor_1px,transparent_1px)] bg-size-[32px_32px] text-foreground/8';

export function GridHero() {
  return (
    <section className='relative isolate grid min-h-96 place-items-center overflow-hidden px-6 text-center'>
      {/* The radial mask fades the grid out toward the edges. */}
      <div
        aria-hidden
        className={`absolute inset-0 -z-10 ${GRID} [mask-image:radial-gradient(ellipse_at_center,black_30%,transparent_75%)]`}
      />
      <h1 className='text-5xl font-semibold tracking-tight'>
        Build on solid ground
      </h1>
    </section>
  );
}
Add a grid background to the hero: 1px lines at 8% black every 32px, drawn with two linear-gradient layers and background-size: 32px 32px, faded with mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%). Use white lines at 8% in dark mode, and keep the headline centered on top.

Paste into Layerwise or any AI coding tool.

What is Grid background?

A grid background repeats a simple pattern, such as square lines, a dot grid, or diagonal lines, across a section. CSS draws it without images: linear-gradient() layers make lines, radial-gradient() makes dots, and background-size sets the spacing. A radial mask-image fades the pattern out toward the edges, so it frames the content instead of filling the whole screen.

It gives developer tools, AI products, and landing pages a technical, blueprint feel, and it adds texture to empty hero space without distracting from the headline.

Keep lines faint, around 5 to 10% contrast against the background, and line the pattern up with your layout spacing so content seems to sit on the grid. Use theme colors so the pattern works in both light and dark mode.

Often confused with

CSS Grid
CSS Grid is a layout system for placing elements in rows and columns. A grid background is only a decorative pattern.

Related terms

All terms

Mask

A CSS technique that uses an image or gradient to set how visible each part of an element is, often used to fade edges softly.

Hero section

The large first section at the top of a landing page, with a headline, a short subhead, a call to action, and a visual.

Grain texture

A fine layer of random noise placed over a gradient or image to add a tactile, printed feel and hide color banding.

Mesh gradient

A smooth, multicolor gradient where several colors blend outward from different points, like paint mixing, often used for hero backgrounds.

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
Now in beta

Ship your next idea