BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/motion-primitives/accordion
This component no longer exists. It was in motion-primitives’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-06 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

Accordion

motion-primitives/accordion
RemovedComponent

A collapsible content component with smooth animations for showing and hiding content.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/ibelick/motion-primitives/HEAD/public/c/accordion.json

Source

accordion.tsxraw.githubusercontent.com/ibelick/motion-primitives/HEAD/public/c/accordion.json
1'use client';
2import {
3 motion,
4 AnimatePresence,
5 Transition,
6 Variants,
7 Variant,
8 MotionConfig,
9} from 'motion/react';
10import { cn } from '@/lib/utils';
11import React, { createContext, useContext, useState, ReactNode } from 'react';
12
13export type AccordionContextType = {
14 expandedValue: React.Key | null;
15 toggleItem: (value: React.Key) => void;
16 variants?: { expanded: Variant; collapsed: Variant };
17};
18
19const AccordionContext = createContext<AccordionContextType | undefined>(
20 undefined
21);
22
23function useAccordion() {
24 const context = useContext(AccordionContext);
25 if (!context) {
26 throw new Error('useAccordion must be used within an AccordionProvider');
27 }
28 return context;
29}
30
31export type AccordionProviderProps = {
32 children: ReactNode;
33 variants?: { expanded: Variant; collapsed: Variant };
34 expandedValue?: React.Key | null;
35 onValueChange?: (value: React.Key | null) => void;
36};
37
38function AccordionProvider({
39 children,
40 variants,
41 expandedValue: externalExpandedValue,
42 onValueChange,
43}: AccordionProviderProps) {
44 const [internalExpandedValue, setInternalExpandedValue] =
45 useState<React.Key | null>(null);
46
47 const expandedValue =
48 externalExpandedValue !== undefined
49 ? externalExpandedValue
50 : internalExpandedValue;
51
52 const toggleItem = (value: React.Key) => {
53 const newValue = expandedValue === value ? null : value;
54 if (onValueChange) {
55 onValueChange(newValue);
56 } else {
57 setInternalExpandedValue(newValue);
58 }
59 };
60
61 return (
62 <AccordionContext.Provider value={{ expandedValue, toggleItem, variants }}>
63 {children}
64 </AccordionContext.Provider>
65 );
66}
67
68export type AccordionProps = {
69 children: ReactNode;
70 className?: string;
71 transition?: Transition;
72 variants?: { expanded: Variant; collapsed: Variant };
73 expandedValue?: React.Key | null;
74 onValueChange?: (value: React.Key | null) => void;
75};
76
77function Accordion({
78 children,
79 className,
80 transition,
81 variants,
82 expandedValue,
83 onValueChange,
84}: AccordionProps) {
85 return (
86 <MotionConfig transition={transition}>
87 <div className={cn('relative', className)} aria-orientation='vertical'>
88 <AccordionProvider
89 variants={variants}
90 expandedValue={expandedValue}
91 onValueChange={onValueChange}
92 >
93 {children}
94 </AccordionProvider>
95 </div>
96 </MotionConfig>
97 );
98}
99
100export type AccordionItemProps = {
101 value: React.Key;
102 children: ReactNode;
103// … truncated

What it pulls in

npm packages

  • motion

Files it writes

  • components/core/accordion.tsx

Facts

Registry
motion-primitives
Type
registry:ui
Access
Free
Files written
1
Licence
the repository states none
In the index
at or before 2026-08-01
Last confirmed
13 days ago

Go to the source

motion-primitives.com ibelick/motion-primitives on GitHub Raw registry item This item as JSON

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

ToolDrift

What the AI coding tools changed last night

tooldrift.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 ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

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 ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

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 ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

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. Changelog

BlockDex