@app-studio/components 0.11.9 → 0.11.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/README.md CHANGED
@@ -4,9 +4,74 @@ Welcome to the comprehensive documentation for `@app-studio/components` — a
4
4
  cross-platform component library that ships a web build and a React Native
5
5
  build with the same public API.
6
6
 
7
- ## 📖 Documentation Structure
7
+ ## Website guides
8
+
9
+ The documentation website starts at `/docs`. Guides live in `docs/guides`;
10
+ component references use the TypeScript API and compiled examples. The sidebar and component
11
+ browser are defined by `src/pages/docs/docs.config.ts` and the existing component
12
+ routes. `/docs/components` links references to their available example pages.
13
+
14
+ ### Getting started
15
+
16
+ - [Introduction](./guides/overview.mdx)
17
+ - [Installation](./guides/installation.mdx)
18
+ - [Quick start](./guides/quick-start.mdx)
19
+ - [React Native setup](./guides/react-native.mdx)
20
+
21
+ ### Foundations
22
+
23
+ - [App Studio foundations](./guides/core.mdx)
24
+ - [Styling and composition](./guides/styling.mdx)
25
+ - [Providers](./guides/providers.mdx)
26
+ - [Colors and theming](./guides/theming.mdx)
27
+ - [Responsive layouts](./guides/responsive.mdx)
28
+
29
+ ### Implementation guides
30
+
31
+ - [Animation](./guides/animation.mdx)
32
+ - [Hooks](./guides/hooks.mdx)
33
+ - [Forms and validation](./guides/forms.mdx)
34
+ - [Accessibility](./guides/accessibility.mdx)
35
+ - [Troubleshooting](./guides/troubleshooting.mdx)
36
+
37
+ Each component reference includes its import, interactive examples with complete
38
+ copyable code, searchable props, required markers, implementation defaults, and
39
+ compound component APIs. Shared style props link to the foundations guides.
40
+
41
+ The **Playground** mode edits one component instance in a real example. It offers
42
+ boolean, enum, text, number, and common styling controls, plus JSON object editors
43
+ for style objects. Preview and copied code share the same prop overrides; state
44
+ and callbacks remain in the original example. Invalid values keep the last valid
45
+ preview and code. Reset restores the original props.
46
+
47
+ ### Maintaining component references
48
+
49
+ Run `npm run docs:api` after changing public props or examples. This generates
50
+ `src/pages/docs/component-api.json` and the lightweight reference-name list from
51
+ the current TypeScript declarations. The website start and production build run
52
+ it automatically. `npm run docs:api:check` checks that the committed data matches
53
+ the source.
54
+
55
+ Focused documentation examples live in `src/pages/docs/examples`. Other examples
56
+ are reused from each component's `examples` folder. Previews execute the compiled
57
+ source; copyable code uses published imports. Modules that are not package
58
+ exports are explicitly identified as repository modules.
59
+
60
+ An optional `Component.playground.tsx` provides a focused playground seed when the
61
+ regular example demonstrates a container or an imperative API. The generator
62
+ extracts editable controls and source ranges from TypeScript; it never evaluates
63
+ user-supplied expressions. Runtime imports are limited to the packages already
64
+ used by these documentation examples.
65
+
66
+ The generator includes the public props, callable compound parts, and a selection
67
+ of common inherited styling props. It does not infer dynamic defaults. The
68
+ original MDX files in `docs/components` remain available as source material and
69
+ for older supplemental URLs; they no longer supply the main component pages.
70
+
71
+ ## Maintainer and platform references
8
72
 
9
73
  ### Core Documentation
74
+
10
75
  - **[Getting Started](./getting-started/introduction.md)** — Quick introduction and setup (web + RN)
11
76
  - **[React Native Guide](./getting-started/react-native.md)** — RN peer deps, compatibility matrix, Form/Grid contracts, Reanimated, Metro/tsc resolution
12
77
  - **[Component Development](./component-development/guide.md)** — Building and contributing components (including `.native.tsx` siblings)
@@ -15,6 +80,7 @@ build with the same public API.
15
80
  - **[Generating a Design-System Config](./design-system/design-system.md)** — Step-by-step recipe (for agents) to author a new brand config that works in light + dark
16
81
 
17
82
  ### Specialized Documentation
83
+
18
84
  - **[ADK Components](../README-ADK.md)** — Agent Development Kit integration
19
85
  - **[Components Reference](./components.md)** — Summary of all component APIs
20
86
  - **[Detailed Components](./components/)** — Per-component pages
@@ -22,23 +88,35 @@ build with the same public API.
22
88
  - **[Contributing](./contributing/documentation.md)** — Contribution guidelines
23
89
 
24
90
  ### Related packages
91
+
25
92
  - **[`app-studio`](../../app-studio/docs/README.md)** — The styling/theme/animation primitive this library is built on (its `Animation.md` and `Native.md` cover the cross-platform fundamentals)
26
93
  - **[`app-studio-rn-demo`](../../app-studio-rn-demo/README.md)** — Working RN sandbox app that consumes `@app-studio/components`
27
94
 
28
95
  ## 🚀 Quick Navigation
29
96
 
30
97
  ### For New Users
31
- Start with the [Getting Started Guide](./getting-started/introduction.md) to understand the library basics and setup process.
98
+
99
+ Start with [Installation](./guides/installation.mdx), then follow the
100
+ [Quick start](./guides/quick-start.mdx).
32
101
 
33
102
  ### For Developers
103
+
34
104
  Refer to the [Component Development Guide](./component-development/guide.md) for building and customizing components.
35
105
 
36
106
  ### For ADK Integration
107
+
37
108
  Check the [ADK Components documentation](../README-ADK.md) for agent-specific functionality.
38
109
 
39
110
  ## Documentation Tools
40
111
 
41
- This library uses several tools to generate and maintain documentation:
112
+ The website's component reference is generated locally without an API key:
113
+
114
+ ```bash
115
+ npm run docs:api
116
+ npm run docs:api:check
117
+ ```
118
+
119
+ The older MDX generation tools are retained for source material:
42
120
 
43
121
  - **MDX**: Component documentation is written in MDX format, allowing for interactive examples
44
122
  - **bot-doc**: Automated documentation generation tool that creates component documentation
@@ -0,0 +1,51 @@
1
+ # Accessibility
2
+
3
+ Components are a starting point. The accessibility of your product also depends on composition, labels, content, styling overrides, and platform behavior.
4
+
5
+ ## Give controls a clear name
6
+
7
+ Use visible labels for fields and meaningful text for actions. An icon-only button needs an accessible name. Avoid using a placeholder as the only field label.
8
+
9
+ ```tsx
10
+ import React from 'react';
11
+ import { Vertical } from 'app-studio';
12
+ import { TextField, Button } from '@app-studio/components';
13
+
14
+ export function LabeledControls() {
15
+ return (
16
+ <Vertical gap={16}>
17
+ <TextField
18
+ label="Project name"
19
+ placeholder="For example, Design system"
20
+ />
21
+ <Button ariaLabel="Create project">Create project</Button>
22
+ </Vertical>
23
+ );
24
+ }
25
+ ```
26
+
27
+ ## Preserve semantics and keyboard behavior
28
+
29
+ Use buttons for actions and links for navigation. When using primitives on web, choose the appropriate `as` element. Keep a visible focus indicator and do not recreate a button with a clickable generic container.
30
+
31
+ Check Tab order, Enter and Space activation, Escape behavior for overlays, and focus return after a dialog closes. Test each component's supported keyboard behavior before composing a new interaction.
32
+
33
+ ## Communicate state and errors
34
+
35
+ Make disabled, selected, loading, success, and error states understandable without color alone. Associate error text with the corresponding field. Announce relevant asynchronous results without moving focus unnecessarily.
36
+
37
+ Do not add ARIA roles that conflict with a control's native semantics. The appropriate API differs between the web and native implementations.
38
+
39
+ ## Check colors and motion
40
+
41
+ Verify contrast in light and dark mode and after applying theme or view overrides. Ensure focus indicators remain visible against the actual surface. Respect reduced motion as described in [Animation](/docs/animation).
42
+
43
+ ## Test the composed experience
44
+
45
+ 1. Complete the main task using only a keyboard.
46
+ 2. Check names, roles, state, and reading order with a screen reader.
47
+ 3. Enlarge text and test narrow layouts without losing content or controls.
48
+ 4. Test invalid and loading states, not only the successful path.
49
+ 5. Repeat platform-specific checks on a real native target when sharing a screen.
50
+
51
+ Automated checks can catch some problems. They do not establish full conformance or replace testing your product's real workflows.
@@ -0,0 +1,43 @@
1
+ # App Studio with AI & coding assistants
2
+
3
+ App Studio publishes the same documentation for people and coding assistants. Use the [documentation index](/llms.txt) to find a topic, then fetch its Markdown page for the actual API and examples. These files are regenerated with the website so the two formats stay aligned.
4
+
5
+ ## Choose the right package
6
+
7
+ - **`app-studio`** is the styling framework. Import `View`, `Horizontal`, `Vertical`, `Text`, `ThemeProvider`, and `ResponsiveProvider` from this package. Install it on its own when building your own component system.
8
+ - **`@app-studio/components`** provides ready-made controls built on the framework. Install both packages when using these controls. Check the component's Import section: repository-only modules are explicitly identified.
9
+ - Web and React Native use dedicated builds. Shared imports do not guarantee identical platform support; check [React Native setup](/docs/react-native) and the component reference.
10
+
11
+ ## Give your assistant the documentation
12
+
13
+ Start with [llms.txt](/llms.txt), a compact index of the framework, setup guides, and component references. Every public page has a Markdown alternative: for example, [installation.md](/docs/installation.md) and [Button.md](/docs/Button.md). The page's HTML head also links to this alternative.
14
+
15
+ The [complete Markdown export](/llms-full.txt) combines the public pages in one file. It is larger; fetch individual pages when your assistant only needs one API or setup step.
16
+
17
+ Use this starting prompt with a coding assistant that can fetch URLs:
18
+
19
+ ```text
20
+ Read https://app-studio-6167b.web.app/llms.txt.
21
+ Use its installation, quick-start, styling, and relevant component references.
22
+ Build a React screen with App Studio using the documented imports and callbacks.
23
+ Check required props, provider setup, peer dependencies, and platform limitations.
24
+ Link the reference pages you used and identify anything the docs do not establish.
25
+ ```
26
+
27
+ If the assistant cannot fetch websites, paste the relevant Markdown page into its context. In an existing repository, include your installed package versions and target platform so the assistant can compare the documentation with your local types.
28
+
29
+ ## Check generated code
30
+
31
+ 1. Follow [Installation](/docs/installation) before adding controls. Keep existing compatible peers rather than forcing an installation.
32
+ 2. Mount `ThemeProvider` when using `theme-*` and `color-*` tokens. Use `ResponsiveProvider` for named responsive rules.
33
+ 3. Use the props documented for the actual component. Required flags, literal defaults, and compound parts are listed in the reference; defaults can be overridden by your design system.
34
+ 4. Controlled input callbacks receive values: `TextField` returns a string, while `Checkbox` and `Switch` return booleans. Keep that value in React or form state.
35
+ 5. Try the generated result in the component playground and run your application's type checks, keyboard checks, and platform tests. A code example does not establish support for every browser or native platform.
36
+
37
+ Continue with [Quick start](/docs/quick-start), [Styling & composition](/docs/styling), and [Accessibility](/docs/accessibility).
38
+
39
+ ## Verify source and licensing
40
+
41
+ The [framework repository](https://github.com/rize-network/app-studio) and [component repository](https://github.com/rize-network/app-studio-components) provide the implementation behind the docs. Component references link to their source declarations. Check the `LICENSE` included with the version you adopt; the two packages have separate terms.
42
+
43
+ These exports make documentation easier to retrieve. They do not guarantee that a search engine or assistant will index, recommend, or cite the project.
@@ -0,0 +1,58 @@
1
+ # Animation
2
+
3
+ Use motion to explain a change or draw attention to new content. Keep important content and controls usable without animation.
4
+
5
+ ## Add an animation preset
6
+
7
+ Import `Animation` from `app-studio` and pass a preset to `animate`:
8
+
9
+ ```tsx
10
+ import React from 'react';
11
+ import { View, Text, Animation } from 'app-studio';
12
+ import { Button } from '@app-studio/components';
13
+
14
+ export function MotionExample() {
15
+ const [version, setVersion] = React.useState(0);
16
+ return (
17
+ <View gap={16} display="flex" flexDirection="column">
18
+ <View
19
+ key={version}
20
+ className="app-motion"
21
+ padding={24}
22
+ borderRadius={12}
23
+ backgroundColor="color-violet-50"
24
+ animate={Animation.fadeIn({ duration: '0.4s' })}
25
+ >
26
+ <Text color="color-violet-900">New content, gently introduced.</Text>
27
+ </View>
28
+ <Button variant="outline" onClick={() => setVersion(version + 1)}>
29
+ Replay
30
+ </Button>
31
+ </View>
32
+ );
33
+ }
34
+ ```
35
+
36
+ The React key remounts the animated content for this demonstration. Do not remount an entire form or screen merely to replay motion; that can reset user state.
37
+
38
+ ## Respect reduced motion
39
+
40
+ On web, add a reduced-motion rule for the region your app animates:
41
+
42
+ ```css
43
+ @media (prefers-reduced-motion: reduce) {
44
+ .app-motion,
45
+ .app-motion * {
46
+ animation: none !important;
47
+ transition: none !important;
48
+ }
49
+ }
50
+ ```
51
+
52
+ Do not make completion, navigation, or access to information depend on an animation finishing. Check your native app's reduced-motion behavior separately.
53
+
54
+ ## Native setup
55
+
56
+ Web presets use CSS keyframes. Native presets use the optional `react-native-reanimated` peer. Without it, animation props are ignored. Follow the peer's platform setup, including the configuration required by your installed version.
57
+
58
+ See [native setup](/docs/react-native) and the [animation reference](https://github.com/rize-network/app-studio/blob/main/docs/Animation.md) for supported presets and options.
@@ -0,0 +1,68 @@
1
+ # App Studio foundations
2
+
3
+ `app-studio` is the framework underneath `@app-studio/components`. It provides a common way to describe layout and styling in React and React Native.
4
+
5
+ ## Layout primitives
6
+
7
+ - `View` is a general-purpose container.
8
+ - `Vertical` stacks children in a column.
9
+ - `Horizontal` places children in a row.
10
+ - `Center` centers its children.
11
+ - `Text` renders text with typography and color props.
12
+ - `Grid` uses CSS Grid on web and a fixed-column Flexbox mapping on native.
13
+
14
+ ```tsx
15
+ import React from 'react';
16
+ import { Vertical, Horizontal, Text } from 'app-studio';
17
+
18
+ export function ProjectSummary() {
19
+ return (
20
+ <Vertical
21
+ gap={16}
22
+ padding={24}
23
+ backgroundColor="color-blue-50"
24
+ borderRadius={12}
25
+ >
26
+ <Text fontSize={22} fontWeight="bold">
27
+ Project overview
28
+ </Text>
29
+ <Horizontal gap={12} alignItems="center">
30
+ <Text color="theme-primary">Ready to build</Text>
31
+ <Text color="color-gray-600">React + Native</Text>
32
+ </Horizontal>
33
+ </Vertical>
34
+ );
35
+ }
36
+ ```
37
+
38
+ ## Style props
39
+
40
+ Pass familiar properties such as `padding`, `gap`, `borderRadius`, and `backgroundColor` directly to a primitive. Numbers represent pixels on web and native layout units on React Native.
41
+
42
+ On web, use semantic elements through `as`, for example `Text as="h2"` or `View as="section"`. Native accessibility semantics need platform-specific props and behavior; browser tags are not native accessibility roles.
43
+
44
+ ## Providers and tokens
45
+
46
+ `ThemeProvider` resolves color tokens. `ResponsiveProvider` configures named devices and breakpoints. Keep them near the root so screens share the same foundation.
47
+
48
+ - `theme-primary` expresses a semantic role you configure.
49
+ - `color-blue-900` selects a palette entry.
50
+ - `media={{ mobile: { padding: 16 } }}` changes styles for a configured device.
51
+
52
+ Use [Colors & theming](/docs/theming) and [Responsive layouts](/docs/responsive) for practical examples.
53
+
54
+ ## Composition stays in React
55
+
56
+ Extract reusable components, pass props and children, and use hooks as you would in a React app. Routing, application state, data fetching, and validation stay with your chosen tools.
57
+
58
+ The ready-made library adds props such as `variant`, `size`, and `views`. See [Styling & composition](/docs/styling) before creating wrappers around every control.
59
+
60
+ ## What changes between platforms
61
+
62
+ Package exports select separate web and native implementations. Many props and conventions are shared, but browser selectors, form semantics, navigation, and CSS Grid do not map one-to-one.
63
+
64
+ Read [React Native](/docs/react-native) before assuming a web example can be shared unchanged.
65
+
66
+ ## Further reference
67
+
68
+ The framework repository has detailed references for [primitives](https://github.com/rize-network/app-studio/blob/main/docs/Components.md), [providers](https://github.com/rize-network/app-studio/blob/main/docs/Providers.md), and [hooks](https://github.com/rize-network/app-studio/blob/main/docs/Hooks.md).
@@ -0,0 +1,79 @@
1
+ # Forms & validation
2
+
3
+ Choose controlled inputs for a small interaction or Formik wrappers for a larger form. Your application owns validation, submission, loading, and server errors.
4
+
5
+ ## Use value-first callbacks
6
+
7
+ `TextField` calls `onChange` with a string. `Checkbox` and `Switch` call it with a boolean. Their callbacks do not receive DOM change events.
8
+
9
+ ```tsx
10
+ import React from 'react';
11
+ import { Vertical } from 'app-studio';
12
+ import { TextField, Checkbox } from '@app-studio/components';
13
+
14
+ export function ControlledFields() {
15
+ const [name, setName] = React.useState('');
16
+ const [updates, setUpdates] = React.useState(false);
17
+ return (
18
+ <Vertical gap={16}>
19
+ <TextField label="Project name" value={name} onChange={setName} />
20
+ <Checkbox
21
+ label="Receive project updates"
22
+ isChecked={updates}
23
+ onChange={setUpdates}
24
+ />
25
+ </Vertical>
26
+ );
27
+ }
28
+ ```
29
+
30
+ ## Connect Formik
31
+
32
+ Formik is a web peer dependency of the component library. Its named wrappers connect field names to form state. This example validates a required value and displays a local confirmation; it does not call an API.
33
+
34
+ ```tsx
35
+ import React from 'react';
36
+ import { Formik } from 'formik';
37
+ import { Vertical, Text } from 'app-studio';
38
+ import { FormikForm, FormikTextField, Button } from '@app-studio/components';
39
+
40
+ export function ProjectForm() {
41
+ const [message, setMessage] = React.useState('');
42
+ return (
43
+ <Formik
44
+ initialValues={{ name: '' }}
45
+ validate={(values) =>
46
+ values.name.trim() ? {} : { name: 'Enter a project name.' }
47
+ }
48
+ onSubmit={(values, { setSubmitting }) => {
49
+ setMessage(`Ready: ${values.name.trim()}`);
50
+ setSubmitting(false);
51
+ }}
52
+ >
53
+ {({ isSubmitting }) => (
54
+ <FormikForm>
55
+ <Vertical gap={16}>
56
+ <FormikTextField name="name" label="Project name" />
57
+ <Button type="submit" isLoading={isSubmitting}>
58
+ Check project
59
+ </Button>
60
+ <Text role="status">{message}</Text>
61
+ </Vertical>
62
+ </FormikForm>
63
+ )}
64
+ </Formik>
65
+ );
66
+ }
67
+ ```
68
+
69
+ For a real asynchronous request, return or await the request in `onSubmit`. Keep submitted data until the save is confirmed, surface failures, and prevent duplicate submissions. Local validation does not replace server validation.
70
+
71
+ ## Labels, errors, and focus
72
+
73
+ Use a visible label for every field. Keep error text close to its input and programmatically associated with it. After validation fails, help the user reach the first invalid field without losing their values.
74
+
75
+ Check keyboard submission as well as pointer interaction. Avoid using placeholder text as the only label. See [Accessibility](/docs/accessibility).
76
+
77
+ ## Native forms
78
+
79
+ Native does not have browser form semantics. Wire submission, return keys, focus, and validation explicitly. See [React Native](/docs/react-native) before sharing a form screen.
@@ -0,0 +1,92 @@
1
+ # Hooks
2
+
3
+ Use framework hooks when React needs to know about the environment or an interaction. Prefer style props for visual changes that do not need application logic.
4
+
5
+ ## Read the current theme
6
+
7
+ `useTheme()` exposes `themeMode`, `setThemeMode`, `theme`, and color helpers. The provider accepts `mode`; the hook's state is named `themeMode`.
8
+
9
+ ```tsx
10
+ import React from 'react';
11
+ import { useTheme, Text } from 'app-studio';
12
+
13
+ export function CurrentTheme() {
14
+ const { themeMode } = useTheme();
15
+ return <Text color="theme-primary">Current theme: {themeMode}</Text>;
16
+ }
17
+ ```
18
+
19
+ Components resolve color tokens automatically. Use `getColor` for a CSS value or `getColorHex` when an external tool requires a literal color. See [Colors & theming](/docs/theming).
20
+
21
+ ## Respond to device state
22
+
23
+ `useResponsive()` reads the configuration from `ResponsiveProvider`. Use `on('mobile')` for device-aware logic. A hook-driven decision re-renders when its state changes; use the `media` prop for purely visual overrides.
24
+
25
+ ```tsx
26
+ import React from 'react';
27
+ import { useResponsive, Text } from 'app-studio';
28
+
29
+ export function DeviceHint() {
30
+ const { on } = useResponsive();
31
+ return <Text>{on('mobile') ? 'Compact viewport' : 'Larger viewport'}</Text>;
32
+ }
33
+ ```
34
+
35
+ Avoid removing essential content just because a viewport is smaller. See [Responsive layouts](/docs/responsive).
36
+
37
+ ## Track hover for a visual detail
38
+
39
+ ```tsx
40
+ import React from 'react';
41
+ import { useHover, View, Text } from 'app-studio';
42
+
43
+ export function HoverDetail() {
44
+ const [ref, hovered] = useHover<HTMLDivElement>();
45
+ return (
46
+ <View
47
+ ref={ref}
48
+ padding={24}
49
+ borderRadius={12}
50
+ backgroundColor={hovered ? 'color-violet-100' : 'color-blue-50'}
51
+ >
52
+ <Text>
53
+ Hover changes this surface; the information is always available.
54
+ </Text>
55
+ </View>
56
+ );
57
+ }
58
+ ```
59
+
60
+ Hover is a browser interaction, not a native touch interaction. Keep actions and information available to keyboard, touch, and assistive-technology users.
61
+
62
+ ## Read window dimensions
63
+
64
+ Wrap consumers of `useWindowSize()` in `WindowSizeProvider`:
65
+
66
+ ```tsx
67
+ import React from 'react';
68
+ import { WindowSizeProvider, useWindowSize, Text } from 'app-studio';
69
+
70
+ function Dimensions() {
71
+ const { width, height } = useWindowSize();
72
+ return (
73
+ <Text>
74
+ Window: {width} × {height}
75
+ </Text>
76
+ );
77
+ }
78
+
79
+ export function WindowExample() {
80
+ return (
81
+ <WindowSizeProvider>
82
+ <Dimensions />
83
+ </WindowSizeProvider>
84
+ );
85
+ }
86
+ ```
87
+
88
+ Window dimensions describe the window, not necessarily a component's available width. On native, verify rotation and split-screen behavior on the target platform.
89
+
90
+ ## Further hooks
91
+
92
+ The framework also exposes hooks for focus, visibility, scrolling, and element position. Consult the [hook reference](https://github.com/rize-network/app-studio/blob/main/docs/Hooks.md) and current TypeScript signatures for their options and platform differences.
@@ -0,0 +1,96 @@
1
+ # Installation
2
+
3
+ Start with an existing React project. Choose the component library for ready-made controls, or the framework alone for your own component system.
4
+
5
+ ## Requirements
6
+
7
+ - React 18 or newer. Keep `react` and `react-dom` on matching versions in a web app.
8
+ - A React build setup that resolves package exports, such as Vite or your existing framework.
9
+ - TypeScript is supported; JavaScript projects can use the same components.
10
+ - For React Native, follow [native setup](/docs/react-native). The core package declares React Native 0.79 or newer.
11
+
12
+ ## Install the component library
13
+
14
+ The library depends on App Studio for styling. Install both:
15
+
16
+ ```bash
17
+ npm install @app-studio/components app-studio
18
+ ```
19
+
20
+ Install the web peer dependencies you do not already have:
21
+
22
+ ```bash
23
+ npm install react react-dom react-router-dom formik zustand lucide-react
24
+ ```
25
+
26
+ Keep existing compatible versions. React Router supports router-dependent components, Formik powers its form wrappers, and Zustand and the icon package support components that use them. Do not use `--force` to hide incompatible peer versions in a consuming application.
27
+
28
+ With another package manager, use the same package names with `pnpm add` or `yarn add`.
29
+
30
+ ## Use the framework on its own
31
+
32
+ If you only need layout primitives, style props, tokens, and motion:
33
+
34
+ ```bash
35
+ npm install app-studio
36
+ ```
37
+
38
+ You do not need the component library or its Formik, Zustand, and icon peers for this starting point. A web app still needs React and React DOM.
39
+
40
+ ## Configure the providers
41
+
42
+ `ThemeProvider` defines the color variables behind `theme-*` and `color-*` tokens. `ResponsiveProvider` supplies the device and breakpoint configuration used by `media` and responsive hooks.
43
+
44
+ ```tsx
45
+ import React from 'react';
46
+ import { ThemeProvider, ResponsiveProvider, Vertical, Text } from 'app-studio';
47
+
48
+ export default function App() {
49
+ return (
50
+ <ThemeProvider theme={{ primary: 'color-blue-900' }}>
51
+ <ResponsiveProvider>
52
+ <Vertical padding={24} gap={12}>
53
+ <Text fontSize={24} color="theme-primary">
54
+ App Studio is ready.
55
+ </Text>
56
+ <Text>Add your application's components here.</Text>
57
+ </Vertical>
58
+ </ResponsiveProvider>
59
+ </ThemeProvider>
60
+ );
61
+ }
62
+ ```
63
+
64
+ Mount providers near the root. Keep your existing router, data fetching, and state providers; App Studio does not replace them.
65
+
66
+ ## Add document defaults
67
+
68
+ The library styles components, not the browser document. Add these defaults to your application's stylesheet:
69
+
70
+ ```css
71
+ * {
72
+ box-sizing: border-box;
73
+ }
74
+ body {
75
+ margin: 0;
76
+ font-family: system-ui, sans-serif;
77
+ }
78
+ button,
79
+ input,
80
+ textarea,
81
+ select {
82
+ font: inherit;
83
+ }
84
+ ```
85
+
86
+ There is no separate component stylesheet to import for these examples.
87
+
88
+ ## When routing is needed
89
+
90
+ Router-dependent components need your app's React Router context. A simple `Button` with `onClick` does not need a router. Internal routing links and navigation components can require one.
91
+
92
+ ## Verify your setup
93
+
94
+ Start your development server. Confirm that the example renders, `theme-primary` has a color, and changing the viewport affects a component with `media` rules.
95
+
96
+ Continue with the [Quick start](/docs/quick-start). If colors or imports are missing, use [Troubleshooting](/docs/troubleshooting).
@@ -0,0 +1,53 @@
1
+ # Build with App Studio
2
+
3
+ A shared foundation for React and React Native. Start with ready-made UI, or build your own components with the styling framework underneath it.
4
+
5
+ <div className="docs-start-grid">
6
+ <a href="/docs/installation">
7
+ <span className="docs-label">START HERE</span>
8
+ <strong>Install the packages</strong>
9
+ <span>Requirements, peer dependencies, and provider setup.</span>
10
+ </a>
11
+ <a href="/docs/components">
12
+ <span className="docs-label">EXPLORE THE LIBRARY</span>
13
+ <strong>Find a component</strong>
14
+ <span>Browse categories, try controls, and open working examples.</span>
15
+ </a>
16
+ </div>
17
+
18
+ ## Two packages, one foundation
19
+
20
+ **`app-studio`** is the framework: layout primitives such as `View`, `Horizontal`, and `Vertical`, typed style props, theme tokens, responsive rules, hooks, and animation presets.
21
+
22
+ **`@app-studio/components`** is the component library built on that framework: buttons, inputs, navigation, feedback, overlays, and other interface controls.
23
+
24
+ Use the framework on its own when you want to create your own controls. Install both packages when you want ready-made components. You do not need to replace your existing React state management or application architecture.
25
+
26
+ ## Your path to a first interface
27
+
28
+ 1. **Install:** choose your platform and add compatible dependencies in [Installation](/docs/installation).
29
+ 2. **Configure:** wrap the app in `ThemeProvider` and `ResponsiveProvider`.
30
+ 3. **Build:** follow the [Quick start](/docs/quick-start) to connect real state to your first controls.
31
+ 4. **Customize:** learn [styling](/docs/styling), [themes](/docs/theming), and [responsive layouts](/docs/responsive).
32
+ 5. **Explore:** use the [component browser](/docs/components) to find reference material and existing examples.
33
+
34
+ ## Conventions to know
35
+
36
+ - Import layout primitives and providers from `app-studio`.
37
+ - Import ready-made controls from `@app-studio/components`.
38
+ - Pass familiar styling properties directly as props.
39
+ - Resolve `theme-*` and `color-*` tokens through `ThemeProvider`.
40
+ - Input callbacks use values: `TextField` returns a string; `Checkbox` and `Switch` return booleans.
41
+ - Platform support depends on the component. Read [React Native](/docs/react-native) before sharing a screen.
42
+
43
+ ## How to use this documentation
44
+
45
+ **Getting started** takes you from installation to your first working interface. **Foundations** explains the styling model. **Guides** covers common implementation decisions.
46
+
47
+ The **component library** is grouped by category. A component's **Reference** page contains its existing documentation, while **Examples** opens its interactive demonstration page. The component browser exposes both, so you can inspect behavior before using it.
48
+
49
+ Component references include import instructions, interactive examples with copyable source, and searchable props tables. Required props, literal implementation defaults, and compound parts are listed together. Shared styling props link back to the foundations guides.
50
+
51
+ ## Build in the open
52
+
53
+ Explore [the component source](https://github.com/rize-network/app-studio-components) and [the framework source](https://github.com/rize-network/app-studio). Refer to each package's included `LICENSE` for its terms of use.