Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
116 commits
Select commit Hold shift + click to select a range
3bdee8f
feat: wip add animatable components + add generic slot component + st…
mrzachnugent Feb 3, 2025
f65f9bc
fix(hooks): rename file names
mrzachnugent Feb 10, 2025
c0824cc
fix: use accessibilityLabelledBy instead of the aria attribute
mrzachnugent Feb 10, 2025
7767f55
feat(accordion): add web context + ref func + reorg sharable code
mrzachnugent Feb 10, 2025
9c7ac42
add todos
mrzachnugent Feb 13, 2025
29b475f
fix(accordion-new): default value + universal root styling + update deps
mrzachnugent Feb 15, 2025
8e09ee8
fix(accordion-new): remove commented out rn to web styling debugging …
mrzachnugent Feb 15, 2025
2f13de5
fix(nextjs-nativewind): remove accordion-new context console logs
mrzachnugent Feb 15, 2025
cd47812
feat(accordion-new): export accordion-native and accordion-web + reorg
mrzachnugent Feb 15, 2025
2071eb5
improve error message trying to access context from wrong platform
mrzachnugent Feb 16, 2025
f2eb6c8
chore(accordion-new): bump to v2.0.0-alpha.1
mrzachnugent Feb 16, 2025
38a9ea8
add todo in nextjs css file
mrzachnugent Feb 16, 2025
fdab3af
feat: add web package and use it
mrzachnugent Feb 16, 2025
1c96879
brainstorming in comments
mrzachnugent Feb 16, 2025
ff74d4a
brainstorming adjustment in comments
mrzachnugent Feb 16, 2025
e8caa20
move @react-native/normalize-colors dep to web package
mrzachnugent Feb 16, 2025
5ab625c
feat(web): remove react-native and react-native-web peer deps + reorg
mrzachnugent Feb 17, 2025
5d30e35
feat(accordion-new): use web and native exports + use .web file exten…
mrzachnugent Feb 17, 2025
576525c
update clean script
mrzachnugent Feb 17, 2025
7b1f4df
feat(nextjs): use platform select instead of web prop
mrzachnugent Feb 18, 2025
559fbc7
refactor(accordion-new): move types
mrzachnugent Feb 18, 2025
fc29b88
refactor(accordion-new): move components to platform named folders
mrzachnugent Feb 18, 2025
50ae897
refactor(accordion-new): re-org files
mrzachnugent Feb 18, 2025
e02e6c6
fix(accordion-new): file extension by target platform + use context t…
mrzachnugent Feb 20, 2025
41fa71f
feat(types): add wip for native platform specific props
mrzachnugent Feb 20, 2025
473df66
add platform specific typing
mrzachnugent Feb 21, 2025
c770dcd
feat(accordion): replace accordion with accordion-new
mrzachnugent Feb 21, 2025
5e1e4c3
feat: use generic slot + radix-ui slot on the web
mrzachnugent Feb 21, 2025
5ed3e05
add use-relative-position file for web to prevent importing react-native
mrzachnugent Feb 21, 2025
f27b252
add use-isomorphic-layout-effect file for web to prevent importing re…
mrzachnugent Feb 21, 2025
d8c0444
fix: rename web to web-light + start pressable + use aria-labelledby …
mrzachnugent Feb 23, 2025
7afef9f
feat(accordion-new): start accordion v2
mrzachnugent Feb 23, 2025
10954fd
refactor: reorganize packages
mrzachnugent Mar 8, 2025
06c62a8
feat(core): add poc for core package
mrzachnugent Mar 8, 2025
c9089f3
fix(core): remove use client banner on every file + refactor
mrzachnugent Mar 9, 2025
0bb8174
feat: add nextjs-no-rn app working execpt tailwind
mrzachnugent Mar 9, 2025
184d641
fix: get tailwind working nextjs no rn
mrzachnugent Mar 9, 2025
070126d
feat: remove core from transpiled nextjs no rn
mrzachnugent Mar 9, 2025
1287ca5
feat(core): add universal components
mrzachnugent Mar 10, 2025
553a474
feat(core): use click for web press ref event
mrzachnugent Mar 10, 2025
e818061
feat(core): use as instead of converting role
mrzachnugent Mar 13, 2025
5753ee8
feat(core): separate universal props in types
mrzachnugent Mar 13, 2025
5e6b010
feat: allow use of state in render pressable children + add mobile to…
mrzachnugent Mar 14, 2025
42e1676
feat: use core for accordion
mrzachnugent Mar 14, 2025
ccbbf82
feat: add reanimated for native only + fix accordion typing
mrzachnugent Mar 14, 2025
7f4e64e
feat: add poc alert-dialog + improve slot for pressable cb children +…
mrzachnugent Mar 16, 2025
731d668
wip to using react 19
mrzachnugent Mar 16, 2025
87d5522
wip codemod forward ref in apps
mrzachnugent Mar 16, 2025
8152f9b
wip codemod forward ref in apps forgotten one
mrzachnugent Mar 16, 2025
28489be
wip codemod forward ref in packages
mrzachnugent Mar 17, 2025
230f174
get nextjs working
mrzachnugent Mar 17, 2025
5713508
feat: finish react 19 update
mrzachnugent Mar 17, 2025
8969da5
feat: nextjs with turbo success + vite - dev only for now
mrzachnugent Mar 19, 2025
106761f
feat: vite build command also working
mrzachnugent Mar 19, 2025
c8e2baa
feat(accordion): export trigger ref type
mrzachnugent Mar 19, 2025
5b6bca3
chore: add radix-ui aspect-ratio + make react peer version 19+
mrzachnugent Mar 26, 2025
c890a48
chore: clean up accordion and alert-dialog
mrzachnugent Mar 26, 2025
6c2d036
temp: add _temp folder to kickstart bumping components to v2
mrzachnugent Mar 26, 2025
5f76104
feat: add with-rn-primitives to add data-rn-primitives attribute for web
mrzachnugent Mar 27, 2025
14deef1
feat: add merge props to utils
mrzachnugent Mar 28, 2025
d573025
feat(core): have text consider type of ancestor for adjusted as
mrzachnugent Mar 28, 2025
60dbcdd
feat: make aspect-ratio v2
mrzachnugent Mar 28, 2025
a39833b
feat: add alert-dialog aspect ratio to nextjs no rn + make adjustments
mrzachnugent Mar 28, 2025
9328d12
feat(aspect-ratio): adjust package json exports
mrzachnugent Mar 31, 2025
3726e52
feat: avatar v2
mrzachnugent Mar 31, 2025
a720b3d
chore: update deps for xcode compatibility
mrzachnugent Apr 2, 2025
fb2013c
add missing components to vite
mrzachnugent Apr 9, 2025
07be853
chore: adjust versions
mrzachnugent Apr 12, 2025
5998a16
feat(checkbox): implement checkbox v2
mrzachnugent Apr 12, 2025
5938930
chore: update to expo sdk 53 beta
mrzachnugent Apr 15, 2025
0f6e6e8
fix(expo-nativewind): alert-dialog content animation
mrzachnugent Apr 15, 2025
81fd51b
feat(progress): implement progress v2
kilbot Apr 17, 2025
99c29e8
use withRNPrimitives util
kilbot Apr 21, 2025
4709e1e
remove accessibilityValue prop for native
kilbot Apr 21, 2025
3ce47c1
update example apps with Progress v2
kilbot Apr 21, 2025
ac3440d
auto-generated app.json change by expo
kilbot Apr 21, 2025
5d01181
toggle v2
kilbot Apr 21, 2025
1a92e4a
fix ref type for native toggle
kilbot Apr 22, 2025
97d8b24
update example apps
kilbot Apr 22, 2025
34f7c72
Update types.ts
kilbot Apr 22, 2025
375d8ab
Update universal toggle web component
kilbot Apr 22, 2025
ee39ef8
Merge pull request #72 from wcpos/@zach/v2
mrzachnugent Apr 23, 2025
51094ca
fix: various little things -- update radix-ui deps + organize imports…
mrzachnugent Apr 23, 2025
7e1e8c8
feat(toggle-group): implement toggle-group v2
kilbot Apr 24, 2025
17bb5e8
Merge remote-tracking branch 'upstream/@zach/v2' into toggle-group
kilbot May 1, 2025
5c0ac75
add useControllableState, fix types
kilbot May 1, 2025
416e09e
update example apps with toggle-group
kilbot May 1, 2025
14be9bb
fix toggle-group example, use RN 0.79.1
kilbot May 1, 2025
6a3bdfb
fix typo
kilbot May 1, 2025
9d769e6
Merge pull request #76 from wcpos/toggle-group
mrzachnugent May 2, 2025
26603d8
fix(toggle-group): type errors + suggestions + organize imports
mrzachnugent May 2, 2025
7989e87
Merge pull request #80 from roninoss/@zach/fixes-for-76
mrzachnugent May 2, 2025
d96b2ad
feat(separator): implement separator v2
kilbot May 5, 2025
d4ed053
fix(separator): prefer function declaration
kilbot May 9, 2025
1486a79
Merge pull request #81 from wcpos/separator
mrzachnugent May 10, 2025
e639ed3
chore(separator): update radix-ui separator dep + remove unused file
mrzachnugent May 10, 2025
03815bc
Merge pull request #82 from roninoss/@zach/radix-separator-update
mrzachnugent May 10, 2025
4b41c57
feat(label): implement label v2
kilbot May 12, 2025
653af9c
fix(label): add 'for' prop on Root, fix types
kilbot May 13, 2025
67b7300
fix(label): update example apps
kilbot May 13, 2025
fb6a747
fix(label): remove deconstructed children
kilbot May 13, 2025
6b1b78c
fix(label): fix web types
kilbot May 13, 2025
62decd8
fix(label): fix children props
kilbot May 14, 2025
0605e4f
fix(label): use correct pressable pattern for universal web
kilbot May 14, 2025
d7519ec
Merge pull request #84 from wcpos/label
mrzachnugent May 15, 2025
75adec4
fix(label): missing type imports + make context not an object + adjus…
mrzachnugent May 15, 2025
685cc5b
feat(collapsible): implement v2
kilbot May 20, 2025
2274cb9
Merge branch '@zach/v2' into collapsible
kilbot May 20, 2025
7858615
Update packages/collapsible/src/web/collapsible-web.tsx
kilbot May 20, 2025
d98eec8
fix(collapsible): fix universal types, improve examples
kilbot May 20, 2025
cf7b68a
fix(example apps): add tailwind base-layer rule for view
kilbot May 21, 2025
f4c6ac3
fix(example-apps): add collapsible animation for expo web
kilbot May 22, 2025
02f936c
Merge pull request #88 from wcpos/collapsible
mrzachnugent Jun 1, 2025
8e10f04
fix(collapsible): update radix-ui + import fixes
mrzachnugent Jun 1, 2025
ff5fcd7
fix(docs): build issue
mrzachnugent Jun 1, 2025
afa881a
Merge pull request #92 from roninoss/@zach/collapsible-v2-update
mrzachnugent Jun 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 4 additions & 5 deletions apps/docs/astro.config.mjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import react from '@astrojs/react';
import starlight from '@astrojs/starlight';
import tailwind from '@astrojs/tailwind';
import vercel from '@astrojs/vercel/static';
import { defineConfig } from 'astro/config';

// https://astro.build/config
export default defineConfig({
output: 'static',
adapters: [vercel()],
adapters: [],
integrations: [
starlight({
favicon: '/favicon.png',
Expand All @@ -17,9 +16,9 @@ export default defineConfig({
ThemeSelect: './src/components/ThemeSelect.astro',
Head: './src/components/Head.astro',
},
social: {
github: 'https://github.com/roninoss/rn-primitives',
},
social: [
{ icon: 'github', label: 'GitHub', href: 'https://github.com/roninoss/rn-primitives' },
],
sidebar: [
{
label: 'Introduction',
Expand Down
27 changes: 13 additions & 14 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
"clean": "rm -rf .turbo node_modules dist .astro"
},
"dependencies": {
"@astrojs/check": "^0.5.6",
"@astrojs/react": "^3.0.10",
"@astrojs/starlight": "^0.21.0",
"@astrojs/check": "^0.9.4",
"@astrojs/react": "^4.2.7",
"@astrojs/starlight": "^0.34.3",
"@astrojs/starlight-tailwind": "^2.0.1",
"@astrojs/tailwind": "^5.1.0",
"@astrojs/vercel": "^7.3.4",
"@radix-ui/react-collapsible": "^1.1.0",
"@radix-ui/react-dropdown-menu": "^2.1.1",
"@radix-ui/react-slot": "^1.1.0",
Expand Down Expand Up @@ -52,19 +51,19 @@
"@rn-primitives/tooltip": "workspace:*",
"@rn-primitives/types": "workspace:*",
"@rn-primitives/utils": "workspace:*",
"@types/react": "~18.3.12",
"@types/react-dom": "^18.2.19",
"@types/react": "19.0.10",
"@types/react-dom": "19.0.4",
"@vercel/analytics": "^1.3.1",
"astro": "^4.4.9",
"class-variance-authority": "^0.7.0",
"clsx": "^2.1.0",
"lucide-react": "^0.334.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"astro": "^5.7.13",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.503.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"sharp": "^0.32.5",
"tailwind-merge": "^2.5.3",
"tailwind-merge": "^3.0.2",
"tailwindcss": "^3.4.13",
"tailwindcss-animate": "^1.0.7",
"typescript": "^5.3.3"
"typescript": "^5.8.3"
}
}
21 changes: 13 additions & 8 deletions apps/docs/src/components/ui/button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,19 @@ export interface ButtonProps
asChild?: boolean;
}

const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
({ className, variant, size, asChild = false, ...props }, ref) => {
const Comp = asChild ? Slot : 'button';
return (
<Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />
);
}
);
const Button = ({
ref,
className,
variant,
size,
asChild = false,
...props
}: ButtonProps & {
ref?: React.RefObject<HTMLButtonElement>;
}) => {
const Comp = asChild ? Slot : 'button';
return <Comp className={cn(buttonVariants({ variant, size, className }))} ref={ref} {...props} />;
};
Button.displayName = 'Button';

export { Button, buttonVariants };
124 changes: 78 additions & 46 deletions apps/docs/src/components/ui/dropdown-menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ const DropdownMenuSub = DropdownMenuPrimitive.Sub;

const DropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;

const DropdownMenuSubTrigger = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
inset?: boolean;
}
>(({ className, inset, children, ...props }, ref) => (
const DropdownMenuSubTrigger = ({
ref,
className,
inset,
children,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubTrigger> & {
inset?: boolean;
} & {
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.SubTrigger>>;
}) => (
<DropdownMenuPrimitive.SubTrigger
ref={ref}
className={cn(
Expand All @@ -34,13 +39,16 @@ const DropdownMenuSubTrigger = React.forwardRef<
{children}
<ChevronRight className='ml-auto h-4 w-4' />
</DropdownMenuPrimitive.SubTrigger>
));
);
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;

const DropdownMenuSubContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.SubContent>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent>
>(({ className, ...props }, ref) => (
const DropdownMenuSubContent = ({
ref,
className,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.SubContent> & {
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.SubContent>>;
}) => (
<DropdownMenuPrimitive.SubContent
ref={ref}
className={cn(
Expand All @@ -49,13 +57,17 @@ const DropdownMenuSubContent = React.forwardRef<
)}
{...props}
/>
));
);
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;

const DropdownMenuContent = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Content>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>
>(({ className, sideOffset = 4, ...props }, ref) => (
const DropdownMenuContent = ({
ref,
className,
sideOffset = 4,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content> & {
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.Content>>;
}) => (
<DropdownMenuPrimitive.Portal>
<DropdownMenuPrimitive.Content
ref={ref}
Expand All @@ -67,15 +79,19 @@ const DropdownMenuContent = React.forwardRef<
{...props}
/>
</DropdownMenuPrimitive.Portal>
));
);
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;

const DropdownMenuItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Item>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
const DropdownMenuItem = ({
ref,
className,
inset,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & {
inset?: boolean;
} & {
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.Item>>;
}) => (
<DropdownMenuPrimitive.Item
ref={ref}
className={cn(
Expand All @@ -85,13 +101,18 @@ const DropdownMenuItem = React.forwardRef<
)}
{...props}
/>
));
);
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;

const DropdownMenuCheckboxItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem>
>(({ className, children, checked, ...props }, ref) => (
const DropdownMenuCheckboxItem = ({
ref,
className,
children,
checked,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.CheckboxItem> & {
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.CheckboxItem>>;
}) => (
<DropdownMenuPrimitive.CheckboxItem
ref={ref}
className={cn(
Expand All @@ -108,13 +129,17 @@ const DropdownMenuCheckboxItem = React.forwardRef<
</span>
{children}
</DropdownMenuPrimitive.CheckboxItem>
));
);
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;

const DropdownMenuRadioItem = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem>
>(({ className, children, ...props }, ref) => (
const DropdownMenuRadioItem = ({
ref,
className,
children,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.RadioItem> & {
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.RadioItem>>;
}) => (
<DropdownMenuPrimitive.RadioItem
ref={ref}
className={cn(
Expand All @@ -130,33 +155,40 @@ const DropdownMenuRadioItem = React.forwardRef<
</span>
{children}
</DropdownMenuPrimitive.RadioItem>
));
);
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;

const DropdownMenuLabel = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Label>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
inset?: boolean;
}
>(({ className, inset, ...props }, ref) => (
const DropdownMenuLabel = ({
ref,
className,
inset,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label> & {
inset?: boolean;
} & {
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.Label>>;
}) => (
<DropdownMenuPrimitive.Label
ref={ref}
className={cn('px-2 py-1.5 text-sm font-semibold', inset && 'pl-8', className)}
{...props}
/>
));
);
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;

const DropdownMenuSeparator = React.forwardRef<
React.ElementRef<typeof DropdownMenuPrimitive.Separator>,
React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>
>(({ className, ...props }, ref) => (
const DropdownMenuSeparator = ({
ref,
className,
...props
}: React.ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator> & {
ref?: React.RefObject<React.ElementRef<typeof DropdownMenuPrimitive.Separator>>;
}) => (
<DropdownMenuPrimitive.Separator
ref={ref}
className={cn('-mx-1 my-1 h-px bg-muted', className)}
{...props}
/>
));
);
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;

const DropdownMenuShortcut = ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>) => {
Expand Down
3 changes: 2 additions & 1 deletion apps/docs/src/content/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { defineCollection } from 'astro:content';
import { docsLoader } from '@astrojs/starlight/loaders';
import { docsSchema } from '@astrojs/starlight/schema';

export const collections = {
docs: defineCollection({ schema: docsSchema() }),
docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }),
};
67 changes: 4 additions & 63 deletions apps/docs/src/content/docs/accordion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,76 +9,17 @@ description: A vertically stacked set of interactive headings that each reveal a
import Code from '@/components/ManualCode.astro';
import { LinkButton } from '@/components/react/LinkButton';
import { Aside, Tabs, TabItem } from '@astrojs/starlight/components';
import importedNativeCode from '@/../node_modules/@rn-primitives/accordion/src/accordion.tsx?raw';
import importedWebCode from '@/../node_modules/@rn-primitives/accordion/src/accordion.web.tsx?raw';
import importedTypesCode from '@/../node_modules/@rn-primitives/accordion/src/types.ts?raw';
import importedIndexCode from '@/../node_modules/@rn-primitives/accordion/src/index.ts?raw';

A vertically stacked set of interactive headings that each reveal a section of content.

## Installation

<Tabs>
<TabItem label="NPM">

Install the component via your command line.

```bash
npx expo install @rn-primitives/accordion
```

</TabItem>
<TabItem label="Manual">
<Aside title="Uses shared primitives">
If you do not already have these primitives in your project, you will need to add them.

- [Types Primitive](/types)
- [Hooks Primitive](/hooks)
- [Slot Primitive](/slot)

</Aside>

<br />

<Tabs>
<TabItem label="Universal">
**Install <a target="_blank" href="https://www.radix-ui.com/primitives/docs/components/accordion">@radix-ui/react-accordion</a>**

```bash
npx expo install @radix-ui/react-accordion
```

<br />

**Copy/paste the following code for web to `~/components/primitives/accordion/accordion.web.tsx`**

<Code code={importedWebCode} lang="tsx" title="~/components/primitives/accordion/accordion.web.tsx" />

**Copy/paste the following code for native to `~/components/primitives/accordion/accordion.tsx`**

<Code code={importedNativeCode} lang="tsx" title="~/components/primitives/accordion/accordion.tsx" />

**Copy/paste the following code for types to `~/components/primitives/accordion/types.ts`**

<Code code={importedTypesCode} lang="tsx" title="~/components/primitives/accordion/types.ts" />

**Copy/paste the following code for exporting to `~/components/primitives/accordion/index.ts`**

<Code code={importedIndexCode} lang="tsx" title="~/components/primitives/accordion/index.ts" />
</TabItem>
<TabItem label="Native Only">
**Copy/paste the following code for native to `~/components/primitives/accordion/index.tsx`**

<Code code={importedNativeCode} lang="tsx" title="~/components/primitives/accordion/index.tsx" />

**Copy/paste the following code for types to `~/components/primitives/accordion/types.ts`**

<Code code={importedTypesCode} lang="tsx" title="~/components/primitives/accordion/types.ts" />
</TabItem>
</Tabs>
</TabItem>
</Tabs>
Install the component via your command line.

```bash
npx expo install @rn-primitives/accordion
```


## Usage
Expand Down
Loading