Skip to content

Latest commit

Β 

History

700 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

App Studio Components

App Studio Components React React Native TypeScript License

A comprehensive, accessible, and customizable cross-platform component library built with TypeScript and app-studio. Components ship a web build (React + DOM) and a React Native build that share the same public API β€” Metro picks platform-specific .native.tsx siblings automatically.

πŸš€ What's Included

  • 60+ UI Components with one API across web and React Native
  • Dual build β€” dist/web/* for browsers, dist/native/components/* for RN
  • ADK Agent Components for Agent Development Kit integration
  • Cross-platform animations β€” Animation.fadeIn() etc. play through react-native-reanimated on RN, CSS keyframes on web
  • Full TypeScript Support β€” exports are split via package.json exports/react-native conditions; customConditions: ["react-native"] lets tsc resolve the right typings for consumers
  • Production Ready β€” battle-tested in real apps

πŸ“š Documentation

Installation

Web

npm install @app-studio/components app-studio
# peers for the web build
npm install react react-dom react-router-dom formik zustand lucide-react

React Native

npm install @app-studio/components app-studio
# RN peer deps (the ones marked optional below are only needed if you use the
# corresponding components)
npm install react react-native lucide-react-native
# Optional β€” gracefully degraded when absent
npm install react-native-svg               # Loader/ProgressBar circle/Accordion chevron
npm install react-native-linear-gradient   # <Gradient/>
npm install react-native-reanimated        # <X animate={Animation.fadeIn()}/>
cd ios && pod install                       # for iOS

See app-studio-rn-demo for a working typecheck-ready RN consumer sandbox.

Quick Start

Web

import { Button, Text } from '@app-studio/components';

export function App() {
  return (
    <div>
      <Text>Hello, world!</Text>
      <Button onClick={() => alert('Clicked!')}>Click me</Button>
    </div>
  );
}

React Native

import { ThemeProvider, View, Animation } from 'app-studio';
import { Button, Text } from '@app-studio/components';

export default function App() {
  return (
    <ThemeProvider>
      <View padding={16}>
        <Text>Hello from React Native!</Text>
        <Button
          onClick={() => console.log('Clicked!')}
          animate={Animation.fadeIn({ duration: '0.6s' })}
        >
          Click me
        </Button>
      </View>
    </ThemeProvider>
  );
}

Metro automatically resolves Button.view.tsx β†’ Button.view.native.tsx on native; the animate prop is interpreted by Reanimated when the peer is installed.

Component Categories

Layout

View Β· Center Β· Horizontal Β· Vertical Β· AspectRatio Β· Separator Β· Resizable

Form

Checkbox Β· Radio Β· Select Β· Switch Β· TextArea Β· TextField Β· Password Β· OTPInput Β· Label Β· ColorInput Β· ComboBox Β· CountryPicker Β· DatePicker Β· Selector Β· TagInput

Navigation

Accordion Β· Menubar Β· NavigationMenu Β· Pagination Β· Sidebar Β· Tabs

Feedback

Alert Β· Modal Β· Toast Β· Tooltip

Data Display

Avatar Β· Badge Β· Card Β· Table Β· ChartΒΉ Β· ProgressBar Β· StatusIndicator

Utility

Button Β· Gradient Β· Loader Β· Text Β· Title Β· Icon Β· Link Β· Background

Interactive

Carousel Β· ContextMenu Β· DropdownMenu Β· HoverCard Β· Slider Β· Toggle Β· ToggleGroup Β· ShareButton Β· Drawer Β· Sheet Β· Portal

ΒΉ Components marked with a footnote do not have a React Native build (web only); they will throw if imported on RN. See the React Native guide for the full compatibility matrix.

Cross-Platform Notes

Concern Web React Native
Routing/links react-router-dom Linking.openURL for external, onPress for nav
Form container semantic <form> styled View; submit and validation are explicit
Grid layout CSS Grid fixed integer columns via flex rows
Portals ReactDOM.createPortal RN <Modal/> for overlays; <Portal/> is inline
Icons lucide-react dynamic imports lucide-react-native (static)
Animations CSS keyframes via app-studio react-native-reanimated (same Animation API)
Gradients linear-gradient CSS react-native-linear-gradient
SVG inline <svg> react-native-svg (optional)
Hover effects _hover, useHover no-op stubs (touch-only)

Design System

All components follow a consistent design system with:

  • Typography: Inter/Geist font, specific sizes/weights
  • Spacing: 4px grid system
  • Colors: Neutral palette with semantic tokens (theme-primary, color-gray-500, …)
  • Rounded corners: Consistent border radius scale
  • Transitions: Subtle CSS / Reanimated animations

Development

Prerequisites

  • Node.js >= 18
  • npm or yarn

Setup

git clone https://github.com/rize-network/app-studio-components.git
cd app-studio-components
npm install --legacy-peer-deps
npm start                      # Vite dev server (web playground)

Available Scripts

Script Description
npm start Web dev server
npm run build Web library bundle via Vite (dist/web.*)
npm run typecheck:native Strict native TypeScript check (catches RN-incompatible code)
npm run build:native Emit dist/native/components/*.{js,d.ts} for RN consumers
npm test Vitest
npm run storybook Storybook
npm run lint:fix ESLint + Prettier

Creating New Components

npm run create-structure -- --name=YourComponentName

The script scaffolds:

src/components/YourComponentName/
β”œβ”€β”€ YourComponentName.tsx           # public wrapper
β”œβ”€β”€ examples/
└── YourComponentName/
    β”œβ”€β”€ YourComponentName.props.ts
    β”œβ”€β”€ YourComponentName.state.ts
    β”œβ”€β”€ YourComponentName.style.ts
    β”œβ”€β”€ YourComponentName.type.d.ts
    └── YourComponentName.view.tsx

If your component uses DOM-only APIs (HTML elements, mouse events, CSS gradients, portal, etc.), add a YourComponentName.view.native.tsx sibling with the React Native implementation. Metro will pick it automatically.

Contributing

See the Contributing Guide. When adding components, also update:

  1. src/components/index.tsx (export it)
  2. docs/components/YourComponentName.mdx (one page per component)
  3. The compatibility matrix in docs/getting-started/react-native.md if the component has a native sibling.

License

MIT β€” see LICENSE.

Acknowledgements

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages