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

Progress bar

Also called progress indicator or loading bar

A horizontal bar that fills from left to right to show how much of a task is done, or slides in a loop while the total is still unknown.

import { motion, useReducedMotion } from 'motion/react';
import { Progress } from '@base-ui/react/progress';

type Props = { fileName: string; percent: number | null };

// Base UI adds role='progressbar' and aria-valuenow; `null` means the total is unknown.
export function UploadProgress({ fileName, percent }: Props) {
  const reduceMotion = useReducedMotion();

  return (
    <Progress.Root
      value={percent}
      className='grid w-72 grid-cols-[1fr_auto] gap-x-3 gap-y-2 text-sm'
    >
      <Progress.Label className='truncate font-medium'>
        {fileName}
      </Progress.Label>
      <Progress.Value className='text-muted-foreground tabular-nums data-complete:text-emerald-600'>
        {(formatted) =>
          percent === null
            ? 'Preparing…'
            : percent === 100
              ? '✓ Done'
              : formatted
        }
      </Progress.Value>
      <Progress.Track className='col-span-2 h-1.5 overflow-hidden rounded-full bg-muted'>
        {percent === null ? (
          // Indeterminate: a 30% segment slides across the track every 1.2s.
          <motion.div
            className='h-full w-[30%] rounded-full bg-blue-500'
            animate={
              reduceMotion
                ? { opacity: [0.4, 1, 0.4] }
                : { x: ['-100%', '333%'] }
            }
            transition={{ duration: 1.2, ease: 'easeInOut', repeat: Infinity }}
          />
        ) : (
          <Progress.Indicator
            className='h-full origin-left rounded-full bg-blue-500 transition-transform duration-300 ease-out data-complete:bg-emerald-500'
            // Base UI sizes the fill with width; scaleX animates it on the GPU instead.
            style={{ width: '100%', transform: `scaleX(${percent / 100})` }}
          />
        )}
      </Progress.Track>
    </Progress.Root>
  );
}
Show upload progress under each file: a 6px rounded track with a blue fill that grows with the percentage uploaded, the percentage as text on the right, and a green check when it reaches 100%. While the upload is being prepared and the size is unknown, show an indeterminate bar where a 30% wide segment slides across every 1.2s. Animate the fill with transform: scaleX and add role="progressbar" with aria-valuenow.

Paste into Layerwise or any AI coding tool.

What is Progress bar?

A progress bar is a track with a fill that grows as a task advances. A determinate bar knows the amount of work, such as bytes uploaded or steps finished, and shows it as a percentage. An indeterminate bar does not know yet, so a short segment slides along the track in a loop.

Use a determinate bar for anything that takes more than a few seconds and can be measured: file uploads, exports, installs, imports. Seeing the fill move and knowing the task is 70% done keeps people patient far longer than a spinner. Switch from indeterminate to determinate as soon as you know the total.

Animate the fill with transform: scaleX() for smooth motion, keep it moving steadily, and avoid parking it at 99%. Use the native <progress> element or role="progressbar" with aria-valuenow, and show the percentage as text as well.

Often confused with

Spinner
A spinner only says the app is busy. A progress bar shows how much is done, so use it whenever you can measure the work.
Scroll progress bar
A scroll progress bar shows how far a reader has scrolled down a page. A progress bar tracks a task such as an upload.

Related terms

All terms

Spinner

A small looping animation, usually a rotating ring, that shows the app is busy with a short task of unknown length.

Loading state

The view a screen shows while its data is on the way, designed together with the outcomes that follow: loaded, empty, or error.

Stepper

A multi-step flow with a row of numbered steps, like Account, Profile, Done, that shows where you are and how many steps are left.

Perceived performance

How fast an app feels to people, which skeleton screens, instant feedback, and progressive loading can improve even when the real wait stays the same.

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

Determinate

photo.jpgUploading · 2.4 MB0%

Indeterminate

Preparing export…Size not known yet