BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/motiq/animated-tabs

Animated Tabs

motiq/animated-tabs
FreeComponent

Radix Tabs with a Motion layoutId sliding active indicator and cross-faded, direction-aware content. Keyboard and roles preserved. Reduced-motion safe.

Live preview

live · rendered by the registry
Rendered by motiq on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://www.motiq.dev/r/animated-tabs.json

Source

registry/animated-shadcn/animated-tabs.tsxwww.motiq.dev/r/animated-tabs.json · first 6 KB
1"use client";
2
3import * as React from "react";
4import {
5 AnimatePresence,
6 motion,
7 useReducedMotion,
8 type Transition,
9} from "motion/react";
10import * as TabsPrimitive from "@radix-ui/react-tabs";
11
12import { cn } from "@/lib/utils";
13
14type TransitionKind = "spring" | "tween";
15
16const SPRING: Transition = { type: "spring", stiffness: 520, damping: 42, mass: 1 };
17const TWEEN: Transition = { duration: 0.24, ease: [0.2, 0, 0, 1] };
18
19interface TabsAnimationContextValue {
20 /** Stable id so every List gets its own sliding indicator layout group. */
21 layoutId: string;
22 transition: TransitionKind;
23 directionAware: boolean;
24 value: string | undefined;
25 reduce: boolean;
26}
27
28const TabsAnimationContext =
29 React.createContext<TabsAnimationContextValue | null>(null);
30
31function useTabsAnimation() {
32 const ctx = React.useContext(TabsAnimationContext);
33 if (!ctx) {
34 throw new Error("AnimatedTabs.* must be rendered inside <AnimatedTabs>.");
35 }
36 return ctx;
37}
38
39export interface AnimatedTabsProps
40 extends React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root> {
41 /** Slide content in the direction of travel between tabs. */
42 directionAware?: boolean;
43 /** Motion feel for the active indicator + content. */
44 transition?: TransitionKind;
45}
46
47/**
48 * AnimatedTabs — Radix Tabs with a Motion `layoutId` sliding active indicator
49 * and cross-faded content.
50 *
51 * Accessibility: Radix owns roles (`tablist`/`tab`/`tabpanel`), arrow-key
52 * roving focus, and controlled/uncontrolled value — untouched here. The
53 * indicator is purely decorative. Under `prefers-reduced-motion` the indicator
54 * and content swap instantly. Content is keyed by active value inside
55 * AnimatePresence with `mode="wait"`, so rapid switching never leaves a stale
56 * panel mounted. Clean-room original.
57 */
58export function AnimatedTabs({
59 directionAware = false,
60 transition = "spring",
61 value: valueProp,
62 defaultValue,
63 onValueChange,
64 className,
65 children,
66 ...props
67}: AnimatedTabsProps) {
68 const reduce = useReducedMotion();
69 const reactId = React.useId();
70 const [value, setValue] = React.useState<string | undefined>(
71 valueProp ?? defaultValue,
72 );
73
74 React.useEffect(() => {
75 if (valueProp !== undefined) setValue(valueProp);
76 }, [valueProp]);
77
78 const handleValueChange = React.useCallback(
79 (next: string) => {
80 if (valueProp === undefined) setValue(next);
81 onValueChange?.(next);
82 },
83 [valueProp, onValueChange],
84 );
85
86// … truncated

What it pulls in

npm packages

  • motion
  • @radix-ui/react-tabs

Other registry items

  • https://motiq.dev/r/utils.json

Files it writes

  • registry/animated-shadcn/animated-tabs.tsx

Facts

Registry
motiq
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-13
Last confirmed
today

Go to the source

Docs on motiq www.motiq.dev RMahammad/motiq on GitHub Raw registry item This item as JSON

More from motiq

All 100 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Activity Streamactivity-streammotiqComponentsFree1 dep
Adaptive Safe-Zone Gridadaptive-safe-zone-gridmotiqComponentsFreeno deps
Agent Run Timelineagent-run-timelinemotiqComponentsFree1 dep
AI Response Streamai-response-streammotiqComponentsFree1 dep
Animated Accordionanimated-accordionmotiqComponentsFree2 deps
Animated Buttonanimated-buttonmotiqComponentsFree1 dep
Animated Dialoganimated-dialogmotiqComponentsFree2 deps
Animated Gridanimated-gridmotiqComponentsFree2 deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product.

BlockDex