Skip to content

Commit a5ab16f

Browse files
committed
feat(docs): add usage page for NativeUI components
Introduce a new documentation page explaining how to use NativeUI components, including platform support details and links to the playground project for interactive learning.
1 parent c1970db commit a5ab16f

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed

app/(site)/docs/usage/page.tsx

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
"use client"
2+
3+
export default function UsagePage() {
4+
return (
5+
<div className="container max-w-3xl py-10">
6+
<div className="space-y-6">
7+
<div className="space-y-4">
8+
<h1 className="text-4xl font-bold tracking-tight">Using NativeUI Components</h1>
9+
<p className="text-xl text-muted-foreground leading-7">
10+
Get started with NativeUI components in your mobile applications. Our official playground project is the perfect way to learn and experiment.
11+
</p>
12+
</div>
13+
14+
<div className="rounded-lg border-2 border-primary/10 bg-primary/5 p-4">
15+
<div className="flex items-center gap-3">
16+
<div className="rounded-full bg-primary/10 p-2">
17+
<svg className="h-5 w-5 text-primary" fill="none" stroke="currentColor" viewBox="0 0 24 24">
18+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
19+
</svg>
20+
</div>
21+
<p className="font-medium text-primary">
22+
NativeUI is primarily designed for iOS and Android. Web components are currently experimental.
23+
</p>
24+
</div>
25+
</div>
26+
27+
<div className="mt-6">
28+
<a
29+
href="https://github.com/nativeui-org/playground"
30+
target="_blank"
31+
rel="noopener noreferrer"
32+
className="inline-flex items-center justify-center rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90"
33+
>
34+
Try the Playground
35+
<svg className="ml-2 h-4 w-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
36+
<path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
37+
</svg>
38+
</a>
39+
</div>
40+
</div>
41+
42+
<div className="mt-12 space-y-8">
43+
<div className="prose prose-gray dark:prose-invert max-w-none">
44+
<h2 className="text-2xl font-bold tracking-tight mb-4">Interactive Learning with the Playground</h2>
45+
<p className="text-muted-foreground text-lg leading-7">
46+
Our <a href="https://github.com/nativeui-org/playground" className="text-primary hover:underline">official playground project</a> provides a complete, hands-on environment for mastering NativeUI components.
47+
</p>
48+
49+
<div className="mt-8 space-y-12">
50+
<div className="space-y-4">
51+
<h3 className="text-xl font-semibold">What You Can Do</h3>
52+
<p className="text-muted-foreground">
53+
The playground is your sandbox for exploring NativeUI:
54+
</p>
55+
<ul className="list-disc pl-6 space-y-2 text-muted-foreground">
56+
<li>Test components in a real mobile environment</li>
57+
<li>Experiment with properties and configurations</li>
58+
<li>View live previews of your changes</li>
59+
<li>Learn from practical, real-world examples</li>
60+
<li>Understand component interactions in context</li>
61+
</ul>
62+
</div>
63+
64+
<div className="space-y-4">
65+
<h3 className="text-xl font-semibold">Best Practices</h3>
66+
<ul className="list-disc pl-6 space-y-2 text-muted-foreground">
67+
<li><strong>Start with Mobile First</strong>: Design your components with mobile interfaces in mind</li>
68+
<li><strong>Use the Playground for Learning</strong>: Experiment before implementation</li>
69+
<li><strong>Component Composition</strong>: Learn from example implementations</li>
70+
</ul>
71+
</div>
72+
73+
<div className="space-y-4">
74+
<h3 className="text-xl font-semibold">Platform Support</h3>
75+
<ul className="list-disc pl-6 space-y-2 text-muted-foreground">
76+
<li><strong>iOS & Android</strong>: Fully supported and thoroughly tested</li>
77+
<li><strong>Web</strong>: Experimental support with potential limitations</li>
78+
</ul>
79+
</div>
80+
81+
<div className="space-y-4">
82+
<h3 className="text-xl font-semibold">Contributing</h3>
83+
<p className="text-muted-foreground">
84+
We welcome contributions to the <a href="https://github.com/nativeui-org/playground" className="text-primary hover:underline">playground project</a>! Whether it's bug fixes, new features,
85+
documentation improvements, or component enhancements.
86+
</p>
87+
</div>
88+
</div>
89+
</div>
90+
</div>
91+
</div>
92+
);
93+
}

0 commit comments

Comments
 (0)