Skip to content

Commit 03668fa

Browse files
Copilothuangyiirene
andcommitted
Reorganize documentation top-level menu structure
Co-authored-by: huangyiirene <7665279+huangyiirene@users.noreply.github.com>
1 parent 01d5bf1 commit 03668fa

6 files changed

Lines changed: 331 additions & 16 deletions

File tree

docs/components/index.mdx

Lines changed: 210 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,210 @@
1+
---
2+
title: "Component Gallery"
3+
description: "Explore all ObjectUI components organized by category"
4+
---
5+
6+
import { Card, Cards } from 'fumadocs-ui/components/card';
7+
8+
# Component Gallery
9+
10+
ObjectUI provides a comprehensive set of components built on React, Tailwind CSS, and Shadcn UI. All components are defined through JSON schemas and rendered with pixel-perfect quality.
11+
12+
## Quick Navigation
13+
14+
Browse components by category to find what you need:
15+
16+
<Cards>
17+
<Card
18+
title="Basic Components"
19+
description="Essential building blocks: Text, Icon, Image, Separator, HTML"
20+
href="/components/basic"
21+
/>
22+
<Card
23+
title="Form Components"
24+
description="Interactive inputs: Button, Input, Select, Checkbox, Switch, Textarea, Slider"
25+
href="/components/form"
26+
/>
27+
<Card
28+
title="Layout Components"
29+
description="Structure your UI: Container, Card, Grid, Flex, Stack, Tabs"
30+
href="/components/layout"
31+
/>
32+
<Card
33+
title="Data Display"
34+
description="Show information: Badge, Avatar, Alert, List"
35+
href="/components/data-display"
36+
/>
37+
<Card
38+
title="Feedback Components"
39+
description="User feedback: Loading, Progress, Skeleton"
40+
href="/components/feedback"
41+
/>
42+
<Card
43+
title="Overlay Components"
44+
description="Floating elements: Dialog, Drawer, Tooltip, Popover"
45+
href="/components/overlay"
46+
/>
47+
<Card
48+
title="Disclosure Components"
49+
description="Show/hide content: Accordion, Collapsible"
50+
href="/components/disclosure"
51+
/>
52+
<Card
53+
title="Complex Components"
54+
description="Advanced patterns: Table (with sorting, filtering, pagination)"
55+
href="/components/complex"
56+
/>
57+
</Cards>
58+
59+
## Component Categories
60+
61+
### Basic Components
62+
63+
The foundation of your UI. These are simple, single-purpose components:
64+
65+
- **[Text](/components/basic/text)** - Display text with typography control
66+
- **[Icon](/components/basic/icon)** - Render icons from Lucide React
67+
- **[Image](/components/basic/image)** - Display images with lazy loading
68+
- **[Separator](/components/basic/separator)** - Visual divider between content
69+
- **[HTML](/components/basic/html)** - Render raw HTML content
70+
71+
### Form Components
72+
73+
Interactive elements for user input:
74+
75+
- **[Button](/components/form/button)** - Trigger actions with multiple variants
76+
- **[Input](/components/form/input)** - Text input with validation
77+
- **[Select](/components/form/select)** - Dropdown selection
78+
- **[Checkbox](/components/form/checkbox)** - Boolean selection
79+
- **[Switch](/components/form/switch)** - Toggle switch
80+
- **[Textarea](/components/form/textarea)** - Multi-line text input
81+
- **[Slider](/components/form/slider)** - Numeric range selection
82+
83+
### Layout Components
84+
85+
Structure and organize your interface:
86+
87+
- **[Container](/components/layout/container)** - Responsive container with max-width
88+
- **[Card](/components/layout/card)** - Content card with header and footer
89+
- **[Grid](/components/layout/grid)** - CSS Grid layout
90+
- **[Flex](/components/layout/flex)** - Flexbox layout
91+
- **[Stack](/components/layout/stack)** - Vertical or horizontal stack
92+
- **[Tabs](/components/layout/tabs)** - Tabbed interface
93+
94+
### Data Display
95+
96+
Present data to users:
97+
98+
- **[Badge](/components/data-display/badge)** - Small status indicators
99+
- **[Avatar](/components/data-display/avatar)** - User profile images
100+
- **[Alert](/components/data-display/alert)** - Contextual messages
101+
- **[List](/components/data-display/list)** - Ordered or unordered lists
102+
103+
### Feedback Components
104+
105+
Provide visual feedback:
106+
107+
- **[Loading](/components/feedback/loading)** - Loading spinner
108+
- **[Progress](/components/feedback/progress)** - Progress bar
109+
- **[Skeleton](/components/feedback/skeleton)** - Loading placeholder
110+
111+
### Overlay Components
112+
113+
Floating UI elements:
114+
115+
- **[Dialog](/components/overlay/dialog)** - Modal dialog
116+
- **[Drawer](/components/overlay/drawer)** - Slide-out drawer
117+
- **[Tooltip](/components/overlay/tooltip)** - Hover tooltips
118+
- **[Popover](/components/overlay/popover)** - Floating popover
119+
120+
### Disclosure Components
121+
122+
Expandable content:
123+
124+
- **[Accordion](/components/disclosure/accordion)** - Expandable sections
125+
- **[Collapsible](/components/disclosure/collapsible)** - Toggle content visibility
126+
127+
### Complex Components
128+
129+
Advanced, feature-rich components:
130+
131+
- **[Table](/components/complex/table)** - Data table with sorting, filtering, and pagination
132+
133+
## Usage Pattern
134+
135+
All ObjectUI components follow the same schema-based pattern:
136+
137+
```json
138+
{
139+
"type": "component-name",
140+
"className": "tailwind-classes",
141+
"props": {
142+
// Component-specific properties
143+
}
144+
}
145+
```
146+
147+
### Example: Button
148+
149+
```json
150+
{
151+
"type": "button",
152+
"label": "Click Me",
153+
"variant": "default",
154+
"size": "md",
155+
"className": "mt-4"
156+
}
157+
```
158+
159+
### Example: Card with Form
160+
161+
```json
162+
{
163+
"type": "card",
164+
"title": "User Profile",
165+
"className": "max-w-md",
166+
"body": {
167+
"type": "form",
168+
"fields": [
169+
{
170+
"type": "input",
171+
"name": "name",
172+
"label": "Full Name"
173+
},
174+
{
175+
"type": "input",
176+
"name": "email",
177+
"label": "Email",
178+
"inputType": "email"
179+
}
180+
]
181+
}
182+
}
183+
```
184+
185+
## Features
186+
187+
All ObjectUI components share these characteristics:
188+
189+
-**Schema-Driven** - Define with JSON, not code
190+
-**Tailwind CSS** - Use utility classes directly in schemas
191+
-**Accessible** - WCAG 2.1 AA compliant
192+
-**Responsive** - Mobile-first design
193+
-**Themeable** - Light/dark mode support
194+
-**Type-Safe** - Full TypeScript support
195+
-**Performant** - Lazy-loaded and tree-shakable
196+
197+
## Next Steps
198+
199+
- **[Quick Start Guide](/guide/quick-start)** - Build your first ObjectUI app
200+
- **[Schema Rendering](/concepts/schema-rendering)** - Learn how the engine works
201+
- **[Component Registry](/concepts/component-registry)** - Register custom components
202+
- **[Expressions](/concepts/expressions)** - Dynamic values with expressions
203+
204+
## Need Help?
205+
206+
Can't find what you're looking for? Check out:
207+
208+
- [Concepts](/concepts) - Core concepts and architecture
209+
- [Reference](/reference) - API documentation and protocol specs
210+
- [GitHub](https://github.com/objectstack-ai/objectui) - Report issues or contribute

docs/components/meta.json

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
{
2+
"title": "Components",
3+
"pages": [
4+
"index",
5+
"---",
6+
{
7+
"title": "Basic",
8+
"pages": [
9+
"basic/text",
10+
"basic/icon",
11+
"basic/image",
12+
"basic/separator",
13+
"basic/html"
14+
]
15+
},
16+
{
17+
"title": "Form",
18+
"pages": [
19+
"form/button",
20+
"form/input",
21+
"form/select",
22+
"form/checkbox",
23+
"form/switch",
24+
"form/textarea",
25+
"form/slider"
26+
]
27+
},
28+
{
29+
"title": "Layout",
30+
"pages": [
31+
"layout/container",
32+
"layout/card",
33+
"layout/grid",
34+
"layout/flex",
35+
"layout/stack",
36+
"layout/tabs"
37+
]
38+
},
39+
{
40+
"title": "Data Display",
41+
"pages": [
42+
"data-display/badge",
43+
"data-display/avatar",
44+
"data-display/alert",
45+
"data-display/list"
46+
]
47+
},
48+
{
49+
"title": "Feedback",
50+
"pages": [
51+
"feedback/loading",
52+
"feedback/progress",
53+
"feedback/skeleton"
54+
]
55+
},
56+
{
57+
"title": "Overlay",
58+
"pages": [
59+
"overlay/dialog",
60+
"overlay/drawer",
61+
"overlay/tooltip",
62+
"overlay/popover"
63+
]
64+
},
65+
{
66+
"title": "Disclosure",
67+
"pages": [
68+
"disclosure/accordion",
69+
"disclosure/collapsible"
70+
]
71+
},
72+
{
73+
"title": "Complex",
74+
"pages": [
75+
"complex/table"
76+
]
77+
}
78+
]
79+
}

docs/ecosystem/meta.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
{
22
"title": "Ecosystem",
33
"pages": [
4+
"objectql",
5+
"api",
46
"plugins",
57
"deployment"
68
]

docs/guide/meta.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
{
2-
"title": "Guide",
2+
"title": "Getting Started",
33
"pages": [
44
"index",
5-
"installation",
65
"quick-start",
6+
"installation",
77
"interactive-demos",
8+
"try-it-online",
9+
"---",
810
"studio",
911
"cli",
10-
"try-it-online",
12+
"---",
1113
"components",
1214
"interactive-showcase",
1315
"showcase"

docs/meta.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
{
22
"nav": [
33
{
4-
"title": "Guide",
4+
"title": "Getting Started",
55
"url": "/guide"
66
},
7-
{
8-
"title": "Concepts",
9-
"url": "/concepts"
10-
},
117
{
128
"title": "Components",
139
"url": "/components"
1410
},
1511
{
16-
"title": "Reference",
12+
"title": "Concepts",
13+
"url": "/concepts"
14+
},
15+
{
16+
"title": "Advanced",
1717
"url": "/reference"
1818
},
1919
{
20-
"title": "Ecosystem",
21-
"url": "/ecosystem"
20+
"title": "Community",
21+
"url": "/community"
2222
}
2323
],
2424
"pages": [
2525
"guide",
26-
"concepts",
2726
"components",
27+
"concepts",
2828
"reference",
2929
"ecosystem",
3030
"community"

docs/reference/meta.json

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,30 @@
11
{
2-
"title": "Reference",
2+
"title": "Advanced",
33
"pages": [
4-
"components",
5-
"protocol",
6-
"api"
4+
{
5+
"title": "API Reference",
6+
"pages": [
7+
"api/core",
8+
"api/react",
9+
"api/components",
10+
"api/designer"
11+
]
12+
},
13+
{
14+
"title": "Protocol",
15+
"pages": [
16+
"protocol/overview",
17+
"protocol/page",
18+
"protocol/form",
19+
"protocol/view",
20+
"protocol/crud",
21+
"protocol/menu",
22+
"protocol/app",
23+
"protocol/report",
24+
"protocol/object"
25+
]
26+
},
27+
"---",
28+
"ecosystem"
729
]
830
}

0 commit comments

Comments
 (0)