Lazy-ui
Lazy-ui
registry components
DocsComponentsBlocksChangelog
GitHub0Install
Navigation11 groups
Get StartedDocs
  • Introduction
  • Installation
  • Changelog
  • All Components
Background13 items
  • Wave CipherNew
  • Horizon CipherNew
  • Orbit CipherNew
  • Orbit BloomNew
  • Orbit MeshNew
  • Aurora MeshNew
  • Chroma FlowNew
  • Prism DriftNew
  • Shadow MeshNew
  • Slime BackgroundNew
  • NeumorphismNew
  • Ripple SurfaceNew
  • Liquid ChromeNew
Text Animate7 items
  • Shiny Text
  • Text WarpNew
  • Text RiseNew
  • Text SpinNew
  • Text ScrambleNew
  • Spinning TextNew
  • Text FlipNew
Animate6 items
  • Counter
  • Liquid RevealNew
  • Liquid TransitionNew
  • Matrix GridNew
  • Particle HaloNew
  • Bling TransitionNew
Effects2 items
  • Reveal Animate
  • Circle CipherNew
Forms2 items
  • Switch
  • Checkbox
Buttons3 items
  • Copy Button
  • GitHub Stars Button
  • Glass ButtonNew
Feedback1 item
  • Progress
Navigation1 item
  • Animated Tabs
Overlay1 item
  • Animate Tooltip
Device Mocks1 item
  • iPhoneNew

Animated Tabs

A single-card tab control with spring-eased indicator and smooth panel transitions.

animated-tabs
0px

Customize

Edit props; preview updates instantly.

Customize
Animate

Props

Props accepted by AnimatedTabs.

PropTypeDefaultDescription
tabsAnimatedTab[]—Array of `{ value, label, content }`. Order defines slide direction.
defaultValuestringtabs[0].valueInitially selected tab `value`. Uncontrolled — ignored if `value` is set.
valuestring—Selected tab `value`. Controlled mode; pair with `onValueChange`.
onValueChange(value: string) => void—Fires whenever the active tab changes (controlled or not).
animate"basic" | "blur""basic"Transition mode. `basic` = carousel slide; `blur` = stacked crossfade with soft blur on the outgoing half.
classNamestring—Extra class names merged onto the root card.

Installation

Choose CLI for the one-line shadcn install, or copy the file manually.

npx shadcn@latest add https://2lazyui.com/r/animated-tabs.json

Usage

Import the component and drop it into a render.

demo.tsx21 lines
import { AnimatedTabs } from "@/components/lazy-ui/animated-tabs";

export function Demo() {
  return (
    <AnimatedTabs
      defaultValue="preview"
      tabs={[
        {
          value: "preview",
          label: "Preview",
          content: <div className="p-8 text-sm text-neutral-300">Preview content</div>,
        },
        {
          value: "code",
          label: "Code",
          content: <pre className="p-4 text-xs">{`<Button />`}</pre>,
        },
      ]}
    />
  );
}

Credits

React useSyncExternalStoreSSR-safe state subscription for the active tab.ResizeObserverMeasures panel height for smooth stage transitions.
Registryv0.1
Animated TabsNavigationCopy ButtonButtonsGitHub Stars ButtonButtonsReveal AnimateEffectsCounterAnimateShiny TextText AnimateText WarpText AnimateText RiseText AnimateText SpinText AnimateText ScrambleText AnimateSpinning TextText AnimateText FlipText AnimateProgressFeedbackSwitchFormsGlass ButtonButtonsCheckboxFormsiPhoneDevice MocksCircle CipherEffectsLiquid RevealAnimateLiquid TransitionAnimateWave CipherBackgroundHorizon CipherBackgroundOrbit CipherBackgroundOrbit BloomBackgroundOrbit MeshBackgroundMatrix GridAnimateParticle HaloAnimateAurora MeshBackgroundChroma FlowBackgroundPrism DriftBackgroundShadow MeshBackgroundSlime BackgroundBackgroundNeumorphismBackgroundRipple SurfaceBackgroundLiquid ChromeBackgroundBling TransitionAnimateAnimate TooltipOverlayPricing · ClassicBlocks · PricingPricing · BentoBlocks · PricingPricing · EditorialBlocks · PricingPricing · MatrixBlocks · PricingPricing · UsageBlocks · Pricing
Browse all 42 components
Up nextRoadmap
DialogPlanned
TabsPlanned
TooltipPlanned
CommandPlanned
Help the project
Star on GitHubSuggest a componentRead the DESIGN.md