Skip to content
Redpanda UI
Esc
↑↓navigate↵open⌘Jpreview
Made by malinskibeniamin
Edit on GitHub

Animation

A list of example Redpanda loading animations.

Powered by

Installation

bash
npx shadcn@latest add @redpanda/loading-animation
bash
pnpm dlx shadcn@latest add @redpanda/loading-animation
bash
yarn dlx shadcn@latest add @redpanda/loading-animation
bash
bunx shadcn@latest add @redpanda/loading-animation
bash
nubx shadcn@latest add @redpanda/loading-animation
bash
aube dlx shadcn@latest add @redpanda/loading-animation

When to use

Loading animations provide visual feedback during asynchronous operations and loading states. Use this decision tree to determine when it’s appropriate:

Usage

tsx
import { LoadingAnimation } from '@/components/ui/loading-animation';

Lottie Animation

tsx
<LoadingAnimation  type="lottie"  data={animationData}  scale={0.5}  lottieOptions={{    loop: true,    autoplay: true,  }}/>

SVG Animation with Progress Control

tsx
<LoadingAnimation type="svg" progress={50} className="w-full h-full">  <YourSVGComponent progress={50} /></LoadingAnimation>

SVG children receive their own explicit props; LoadingAnimation does not inspect or clone them.

Auto-playing Loading Animation

tsx
<LoadingAnimation type="svg">  <LoadingBarComponent /></LoadingAnimation>

Props

PropType
type'lottie' | 'svg'

The type of animation to render

Type'lottie' | 'svg'
data?unknown

Animation data for Lottie animations

Typeunknown
children?React.ReactNode

Child components to render (typically for SVG animations)

TypeReact.ReactNode
progress?number

Controlled Lottie progress (0–100). Pass progress explicitly to SVG children; the container does not clone or rewrite them.

Typenumber
scale?number

Scale factor for the animation

Typenumber
lottieOptions?LoadingAnimationLottieOptions

Options to pass to the Lottie animation

TypeLoadingAnimationLottieOptions
width?string | number

Width of the animation container

Typestring | number
height?string | number

Height of the animation container

Typestring | number
aspectRatio?string

Aspect ratio of the animation container

Typestring
responsive?boolean

Whether the animation should be responsive

Typeboolean
Defaulttrue
centered?boolean

Whether the animation should be centered

Typeboolean
Defaulttrue
className?string

Additional CSS classes to apply

Typestring
style?React.CSSProperties

Inline styles to apply

TypeReact.CSSProperties

Examples

Loading Redpanda (loading bar)

Running Redpanda (treadmill)

Running Redpanda

Credits

  • We use the work from Ben Weinstein for all complex Lottie-based animations.

Recent changes

  • patchv1.2.0Pin shipped dependency floors to the version we develop against. Registry items now declare ranges like `^5.1.9` (the actual installed version) instead of collapsing to `^5.0.0`, so consumers start on the known-tested baseline while caret semantics still allow any compatible release within the same major.#133
  • minorv1.1.0Theme docs refresh, readability pass on semantic foregrounds, and consumer-facing Base UI regression fixes.#121
  • minorv1.0.0Post-Base-UI polish. Public API unchanged.#116
  • majorv1.0.0Migrate every Radix-based primitive to `@base-ui/react@^1.4.0` (Base UI).#114
  • minorv0.3.0Add theme-provider component to the registry with documentation and tests. Includes playground type improvements (export RegistryItem, remove as-const boilerplate) and docs site dark mode border color fix.#109
See full history →

Last updated on

Was this page helpful?