@frosted-ui/react-native 0.0.1-canary.93 → 0.0.1-canary.95

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.
Files changed (54) hide show
  1. package/README.md +18 -5
  2. package/dist/components/avatar.d.ts.map +1 -1
  3. package/dist/components/avatar.js +1 -0
  4. package/dist/components/avatar.js.map +1 -1
  5. package/dist/components/badge.d.ts.map +1 -1
  6. package/dist/components/badge.js +2 -0
  7. package/dist/components/badge.js.map +1 -1
  8. package/dist/components/button.js +1 -1
  9. package/dist/components/card.d.ts.map +1 -1
  10. package/dist/components/card.js +2 -1
  11. package/dist/components/card.js.map +1 -1
  12. package/dist/components/circular-progress.d.ts +21 -0
  13. package/dist/components/circular-progress.d.ts.map +1 -0
  14. package/dist/components/circular-progress.js +78 -0
  15. package/dist/components/circular-progress.js.map +1 -0
  16. package/dist/components/heading.d.ts +2 -2
  17. package/dist/components/heading.d.ts.map +1 -1
  18. package/dist/components/icon-button.js +1 -1
  19. package/dist/components/index.d.ts +4 -0
  20. package/dist/components/index.d.ts.map +1 -1
  21. package/dist/components/index.js +4 -0
  22. package/dist/components/index.js.map +1 -1
  23. package/dist/components/link.d.ts +19 -0
  24. package/dist/components/link.d.ts.map +1 -0
  25. package/dist/components/link.js +68 -0
  26. package/dist/components/link.js.map +1 -0
  27. package/dist/components/list.d.ts +37 -0
  28. package/dist/components/list.d.ts.map +1 -0
  29. package/dist/components/list.js +112 -0
  30. package/dist/components/list.js.map +1 -0
  31. package/dist/components/select.js +1 -1
  32. package/dist/components/separator.d.ts.map +1 -1
  33. package/dist/components/separator.js +2 -3
  34. package/dist/components/separator.js.map +1 -1
  35. package/dist/components/slider.d.ts +30 -0
  36. package/dist/components/slider.d.ts.map +1 -0
  37. package/dist/components/slider.js +248 -0
  38. package/dist/components/slider.js.map +1 -0
  39. package/dist/components/text-area.d.ts.map +1 -1
  40. package/dist/components/text-area.js +1 -1
  41. package/dist/components/text-area.js.map +1 -1
  42. package/dist/components/text-field.d.ts.map +1 -1
  43. package/dist/components/text-field.js +41 -3
  44. package/dist/components/text-field.js.map +1 -1
  45. package/dist/components/text.d.ts +2 -2
  46. package/dist/components/text.d.ts.map +1 -1
  47. package/dist/components/text.js +11 -2
  48. package/dist/components/text.js.map +1 -1
  49. package/docs/llm/COLOR_SYSTEM.md +799 -0
  50. package/docs/llm/COMPONENTS.md +1329 -0
  51. package/docs/llm/DESIGN_PATTERNS.md +2567 -0
  52. package/docs/llm/README.md +118 -0
  53. package/docs/llm/TYPOGRAPHY.md +516 -0
  54. package/package.json +9 -3
@@ -0,0 +1,118 @@
1
+ # Frosted UI Design System — LLM Reference
2
+
3
+ > This documentation is designed for AI/LLM consumption when generating React Native applications using the Frosted UI design system.
4
+
5
+ ## Accessing These Docs
6
+
7
+ When `@frosted-ui/react-native` is installed in a project, these documentation files are available at:
8
+
9
+ ```
10
+ node_modules/@frosted-ui/react-native/docs/llm/
11
+ ├── README.md # This file (start here)
12
+ ├── COLOR_SYSTEM.md # Color palettes, shades, variants
13
+ ├── TYPOGRAPHY.md # Text scale, font weights, components
14
+ ├── COMPONENTS.md # Full component API reference
15
+ └── DESIGN_PATTERNS.md # UX patterns, layout composition
16
+ ```
17
+
18
+ **For AI Agents**: Read these files to understand how to properly use Frosted UI components. Start with this README, then reference specific docs as needed.
19
+
20
+ ## Purpose
21
+
22
+ These guides provide structured, detailed information about Frosted UI conventions, patterns, and best practices. AI models should reference these documents when generating code to ensure consistency with the design system.
23
+
24
+ ## Available Documentation
25
+
26
+ | Document | Description |
27
+ | ------------------------------------------ | ------------------------------------------------------------------------------------ |
28
+ | [COLOR_SYSTEM.md](./COLOR_SYSTEM.md) | Complete guide to the color system, palettes, shades, variants, and accessibility |
29
+ | [TYPOGRAPHY.md](./TYPOGRAPHY.md) | Typography scale, font weights, Text/Heading components, and automatic text styling |
30
+ | [COMPONENTS.md](./COMPONENTS.md) | Full component reference with props, variants, and usage examples |
31
+ | [DESIGN_PATTERNS.md](./DESIGN_PATTERNS.md) | **For Design Engineers** — UX patterns, layout composition, visual design principles |
32
+
33
+ ## Quick Import Reference
34
+
35
+ ```typescript
36
+ // Core imports
37
+ import {
38
+ // Theme
39
+ ThemeProvider,
40
+ useTheme,
41
+ useThemeTokens,
42
+
43
+ // Components
44
+ Button,
45
+ Badge,
46
+ Callout,
47
+ Card,
48
+ Checkbox,
49
+ CircularProgress,
50
+ Dialog,
51
+ Heading,
52
+ IconButton,
53
+ Progress,
54
+ RadioGroup,
55
+ Select,
56
+ Separator,
57
+ Skeleton,
58
+ Spinner,
59
+ Switch,
60
+ Tabs,
61
+ Text,
62
+ TextArea,
63
+ TextField,
64
+ Tooltip,
65
+
66
+ // Types
67
+ type AccentColor,
68
+ type Color,
69
+ type SemanticColor,
70
+ } from '@frosted-ui/react-native';
71
+ ```
72
+
73
+ ## Key Principles
74
+
75
+ ### Component Usage
76
+
77
+ 1. **Use Frosted UI's Text** — Always use `<Text>` from `@frosted-ui/react-native`, not React Native's default
78
+ 2. **Text auto-styles in components** — `<Text>` inside `Button`, `Badge`, `Callout` etc. automatically gets correct size and color
79
+ 3. **Use semantic colors** — `danger`, `warning`, `success`, `info` instead of explicit color names for status indicators
80
+ 4. **Default to accent** — Most components default to the app's accent color; only override when semantically meaningful
81
+
82
+ ### Button Hierarchy
83
+
84
+ 5. **Primary action** — `variant="solid"` (one per view)
85
+ 6. **Secondary action** — `variant="soft" color="gray"`
86
+ 7. **Toolbar/neutral** — `variant="surface"` (pairs with form inputs)
87
+ 8. **Tertiary/inline** — `variant="ghost"`
88
+
89
+ ### Visual Design
90
+
91
+ 9. **Theme-aware** — All colors automatically adapt to light/dark mode
92
+ 10. **Consistent spacing** — Use 4, 8, 12, 16, 24, 32px scale for gaps and padding
93
+ 11. **Accessible** — Color combinations are designed to meet WCAG contrast requirements
94
+
95
+ ### Responsive Design
96
+
97
+ 12. **Mobile-first** — Design for mobile, content adapts to larger screens
98
+ 13. **Choose layout strategy** — Simple apps: centered (600px max). Complex apps: adaptive grid
99
+ 14. **Don't resize components** — Keep button sizes, fonts, etc. consistent across breakpoints
100
+ 15. **Use flexWrap for grids** — Let items wrap naturally based on screen width
101
+
102
+ ## App Structure Template
103
+
104
+ ```tsx
105
+ import { ThemeProvider, PortalHost } from '@frosted-ui/react-native';
106
+ import { GestureHandlerRootView } from 'react-native-gesture-handler';
107
+
108
+ export default function App() {
109
+ return (
110
+ <GestureHandlerRootView style={{ flex: 1 }}>
111
+ <ThemeProvider accentColor="blue">
112
+ {/* Your app content */}
113
+ <PortalHost />
114
+ </ThemeProvider>
115
+ </GestureHandlerRootView>
116
+ );
117
+ }
118
+ ```
@@ -0,0 +1,516 @@
1
+ # Frosted UI Typography System
2
+
3
+ > **For AI/LLM Code Generation**: This document explains the Frosted UI typography system for React Native. Follow these guidelines to ensure consistent, readable text across your application.
4
+
5
+ ## Critical: Use Frosted UI's Text Component
6
+
7
+ **Always use `<Text>` from `@frosted-ui/react-native` instead of React Native's default `<Text>` component.**
8
+
9
+ ```tsx
10
+ // ❌ WRONG: React Native's Text has no design system integration
11
+ import { Text } from 'react-native';
12
+
13
+ // ✅ CORRECT: Frosted UI's Text with typography tokens and theme awareness
14
+ import { Text } from '@frosted-ui/react-native';
15
+ ```
16
+
17
+ ### Why This Matters
18
+
19
+ Frosted UI's `<Text>` component:
20
+
21
+ 1. **Applies typography tokens** — Consistent font sizes, line heights, and letter spacing
22
+ 2. **Theme-aware colors** — Automatically uses the correct text color for light/dark mode
23
+ 3. **Context-aware styling** — When placed inside components like `Button`, `Badge`, or `Callout`, text automatically receives the correct size and color
24
+ 4. **Color prop support** — Accepts a `color` prop for semantic coloring
25
+
26
+ ---
27
+
28
+ ## Typography Scale
29
+
30
+ Frosted UI uses a 10-step typography scale (0-9). Each step defines `fontSize`, `lineHeight`, and `letterSpacing`.
31
+
32
+ | Size | Font Size | Line Height | Use Case |
33
+ | ---- | --------- | ----------- | ------------------------------------- |
34
+ | `0` | 10px | 12px | Tiny labels, captions |
35
+ | `1` | 12px | 16px | Small labels, helper text |
36
+ | `2` | 14px | 20px | Secondary text, descriptions |
37
+ | `3` | 16px | 24px | **Default body text** (mobile-first) |
38
+ | `4` | 18px | 26px | Small headings, emphasized text |
39
+ | `5` | 20px | 28px | Section headings |
40
+ | `6` | 24px | 30px | **Default heading size**, page titles |
41
+ | `7` | 28px | 34px | Large headings |
42
+ | `8` | 32px | 38px | Hero headings |
43
+ | `9` | 40px | 48px | Display text, hero sections |
44
+
45
+ ---
46
+
47
+ ## Font Weights
48
+
49
+ | Weight | Value | Use Case |
50
+ | ----------- | ----- | ----------------------------------------- |
51
+ | `light` | 300 | De-emphasized text |
52
+ | `regular` | 400 | **Default for body text** |
53
+ | `medium` | 500 | Labels, slightly emphasized text |
54
+ | `semi-bold` | 600 | Sub-headings |
55
+ | `bold` | 700 | **Default for headings**, strong emphasis |
56
+
57
+ ---
58
+
59
+ ## Typography Components
60
+
61
+ ### `<Text>` — Body Text
62
+
63
+ The primary component for all text content.
64
+
65
+ ```tsx
66
+ import { Text } from '@frosted-ui/react-native';
67
+
68
+ // Default body text (size="3", weight="regular", color=gray-12)
69
+ <Text>Default body text</Text>
70
+
71
+ // With size
72
+ <Text size="1">Small helper text</Text>
73
+ <Text size="2">Secondary text</Text>
74
+
75
+ // With weight
76
+ <Text weight="medium">Medium weight text</Text>
77
+ <Text weight="bold">Bold text</Text>
78
+
79
+ // With color (uses palette shade 11 for the specified color)
80
+ <Text color="blue">Blue colored text</Text>
81
+ <Text color="gray">Secondary/muted text</Text>
82
+
83
+ // Combining props
84
+ <Text size="1" weight="medium" color="gray">
85
+ Small, medium-weight, gray text
86
+ </Text>
87
+ ```
88
+
89
+ #### Text Props
90
+
91
+ | Prop | Type | Default | Description |
92
+ | -------- | ------------------------------------------------------------------- | ----------------- | ----------------------------------------- |
93
+ | `size` | `'0'` - `'9'` | `'3'` | Typography scale step |
94
+ | `weight` | `'light'` \| `'regular'` \| `'medium'` \| `'semi-bold'` \| `'bold'` | Inherited or none | Font weight |
95
+ | `color` | `Color` | `gray` (shade 12) | Text color (uses shade 11 of the palette) |
96
+
97
+ ---
98
+
99
+ ### `<Heading>` — Headings and Titles
100
+
101
+ Use for page titles, section headings, and any hierarchical text structure.
102
+
103
+ ```tsx
104
+ import { Heading } from '@frosted-ui/react-native';
105
+
106
+ // Default heading (size="6", weight="bold")
107
+ <Heading>Page Title</Heading>
108
+
109
+ // Different sizes for hierarchy
110
+ <Heading size="9">Hero Title</Heading>
111
+ <Heading size="7">Section Title</Heading>
112
+ <Heading size="5">Subsection Title</Heading>
113
+ <Heading size="4">Card Title</Heading>
114
+
115
+ // With color
116
+ <Heading color="blue">Colored Heading</Heading>
117
+
118
+ // Custom weight
119
+ <Heading size="6" weight="semi-bold">Semi-bold Heading</Heading>
120
+ ```
121
+
122
+ #### Heading Props
123
+
124
+ | Prop | Type | Default | Description |
125
+ | -------- | ------------------------------------------------------------------- | ----------------- | --------------------- |
126
+ | `size` | `'0'` - `'9'` | `'6'` | Typography scale step |
127
+ | `weight` | `'light'` \| `'regular'` \| `'medium'` \| `'semi-bold'` \| `'bold'` | `'bold'` | Font weight |
128
+ | `color` | `Color` | `gray` (shade 12) | Text color |
129
+
130
+ ---
131
+
132
+ ### `<Label>` — Form Labels
133
+
134
+ Use for labeling form inputs. Use `nativeID` on Label and `aria-labelledby` on the input for accessibility.
135
+
136
+ ```tsx
137
+ import { Label, TextField } from '@frosted-ui/react-native';
138
+ import { View } from 'react-native';
139
+
140
+ <View style={{ gap: 8 }}>
141
+ <Label nativeID="email">Email address</Label>
142
+ <TextField.Input placeholder="you@example.com" aria-labelledby="email" />
143
+ </View>
144
+
145
+ // Disabled state
146
+ <Label nativeID="disabled-field" disabled>Disabled label</Label>
147
+ ```
148
+
149
+ Label uses size `2` and weight `medium` by default.
150
+
151
+ ---
152
+
153
+ ### `<Code>` — Inline Code
154
+
155
+ For displaying code snippets, technical values, or monospace text.
156
+
157
+ ```tsx
158
+ import { Code } from '@frosted-ui/react-native';
159
+
160
+ // Default (soft variant)
161
+ <Text>Run <Code>npm install</Code> to get started</Text>
162
+
163
+ // Variants
164
+ <Code variant="soft">soft code</Code>
165
+ <Code variant="solid">solid code</Code>
166
+ <Code variant="outline">outline code</Code>
167
+ <Code variant="ghost">ghost code</Code>
168
+
169
+ // With color
170
+ <Code color="green">success</Code>
171
+ <Code color="red">error</Code>
172
+
173
+ // Sizes match the typography scale
174
+ <Code size="1">small code</Code>
175
+ <Code size="3">larger code</Code>
176
+ ```
177
+
178
+ ---
179
+
180
+ ### `<Link>` — Pressable Text Links
181
+
182
+ For navigation links and clickable text. Uses accent color by default.
183
+
184
+ ```tsx
185
+ import { Link, Text } from '@frosted-ui/react-native';
186
+
187
+ // Basic link
188
+ <Link onPress={() => navigation.navigate('Terms')}>Terms of Service</Link>
189
+
190
+ // Inline within text
191
+ <Text>
192
+ By signing up, you agree to our <Link onPress={() => {}}>Terms</Link> and{' '}
193
+ <Link onPress={() => {}}>Privacy Policy</Link>.
194
+ </Text>
195
+
196
+ // With color
197
+ <Link color="blue" onPress={() => {}}>Documentation</Link>
198
+ <Link color="danger" onPress={() => {}}>Delete account</Link>
199
+
200
+ // Underline options
201
+ <Link underline="always" onPress={() => {}}>Always underlined</Link>
202
+ <Link underline="auto" onPress={() => {}}>Underlined on press</Link>
203
+
204
+ // Sizes and weights
205
+ <Link size="2" weight="medium" onPress={() => {}}>Medium link</Link>
206
+ ```
207
+
208
+ | Prop | Type | Default | Description |
209
+ | ----------- | ------------------------------- | ---------- | --------------------------- |
210
+ | `size` | `'0'` - `'9'` | `'3'` | Text size |
211
+ | `weight` | Font weight | — | Font weight |
212
+ | `color` | `Color` | `'accent'` | Link color (uses a11 shade) |
213
+ | `underline` | `'auto' \| 'hover' \| 'always'` | `'auto'` | Underline behavior |
214
+
215
+ > **Note**: `Link` renders text internally — do NOT wrap children in `<Text>`.
216
+
217
+ > **Inheritance**: When nested inside `<Text>`, Link automatically inherits `size` and `weight` from the parent, so inline links match surrounding text.
218
+
219
+ ---
220
+
221
+ ## Automatic Text Styling in Components
222
+
223
+ **This is a key feature:** When you place `<Text>` inside certain Frosted UI components, the text automatically receives appropriate styling.
224
+
225
+ ### Components That Auto-Style Text
226
+
227
+ | Component | Text Behavior |
228
+ | -------------- | -------------------------------------------------------- |
229
+ | `Button` | Size matches button size, color based on variant |
230
+ | `Badge` | Size matches badge size, color based on variant |
231
+ | `Callout` | Size based on callout size, color from callout's palette |
232
+ | `Tabs.Trigger` | Appropriate size and color for tab state |
233
+
234
+ ### Example: Button
235
+
236
+ ```tsx
237
+ import { Button, Text } from '@frosted-ui/react-native';
238
+
239
+ // ✅ Text automatically gets correct size and color
240
+ <Button variant="solid" color="blue" size="2">
241
+ <Text>Submit</Text>
242
+ </Button>
243
+
244
+ // ✅ Same result - Text inherits from Button
245
+ <Button variant="soft" color="danger">
246
+ <Text>Delete</Text>
247
+ </Button>
248
+
249
+ // ❌ DON'T manually style text inside buttons
250
+ <Button variant="solid">
251
+ <Text style={{ color: 'white', fontSize: 14 }}>Wrong</Text>
252
+ </Button>
253
+ ```
254
+
255
+ ### Example: Badge
256
+
257
+ ```tsx
258
+ import { Badge, Text } from '@frosted-ui/react-native';
259
+
260
+ // ✅ Text automatically styled
261
+ <Badge color="success" variant="soft">
262
+ <Text>Completed</Text>
263
+ </Badge>
264
+
265
+ <Badge color="warning" variant="solid">
266
+ <Text>Pending</Text>
267
+ </Badge>
268
+ ```
269
+
270
+ ### Example: Callout
271
+
272
+ ```tsx
273
+ import { Callout, Text } from '@frosted-ui/react-native';
274
+
275
+ // ✅ Text inherits callout's color and size
276
+ <Callout.Root color="info">
277
+ <Callout.Text>
278
+ <Text>This text is automatically styled</Text>
279
+ </Callout.Text>
280
+ </Callout.Root>;
281
+ ```
282
+
283
+ ---
284
+
285
+ ## Common Typography Patterns
286
+
287
+ ### Page Header
288
+
289
+ ```tsx
290
+ import { Heading, Text } from '@frosted-ui/react-native';
291
+ import { View } from 'react-native';
292
+
293
+ <View style={{ gap: 4 }}>
294
+ <Heading size="6">Settings</Heading>
295
+ <Text size="2" color="gray">
296
+ Manage your account preferences
297
+ </Text>
298
+ </View>;
299
+ ```
300
+
301
+ ### Section Header
302
+
303
+ ```tsx
304
+ import { Heading, Text } from '@frosted-ui/react-native';
305
+ import { View } from 'react-native';
306
+
307
+ <View style={{ gap: 4 }}>
308
+ <Heading size="4">Notifications</Heading>
309
+ <Text size="2" color="gray">
310
+ Choose how you want to be notified
311
+ </Text>
312
+ </View>;
313
+ ```
314
+
315
+ ### List Item with Description
316
+
317
+ ```tsx
318
+ import { Text } from '@frosted-ui/react-native';
319
+ import { View } from 'react-native';
320
+
321
+ <View style={{ gap: 2 }}>
322
+ <Text size="2" weight="medium">
323
+ Email notifications
324
+ </Text>
325
+ <Text size="1" color="gray">
326
+ Receive updates about your account
327
+ </Text>
328
+ </View>;
329
+ ```
330
+
331
+ ### Form Field
332
+
333
+ ```tsx
334
+ import { Label, Text, TextField } from '@frosted-ui/react-native';
335
+ import { View } from 'react-native';
336
+
337
+ <View style={{ gap: 8 }}>
338
+ <Label nativeID="email">Email address</Label>
339
+ <TextField.Input placeholder="you@example.com" aria-labelledby="email" />
340
+ <Text size="1" color="gray">
341
+ We'll never share your email
342
+ </Text>
343
+ </View>;
344
+ ```
345
+
346
+ For inputs with icons, use the compound pattern:
347
+
348
+ ```tsx
349
+ <View style={{ gap: 8 }}>
350
+ <Label nativeID="search">Search</Label>
351
+ <TextField.Root>
352
+ <TextField.Slot>
353
+ <SearchIcon size={16} />
354
+ </TextField.Slot>
355
+ <TextField.Input placeholder="Search..." aria-labelledby="search" />
356
+ </TextField.Root>
357
+ </View>
358
+ ```
359
+
360
+ ### Error Message
361
+
362
+ ```tsx
363
+ import { Text } from '@frosted-ui/react-native';
364
+
365
+ <Text size="1" color="red">
366
+ This field is required
367
+ </Text>;
368
+ ```
369
+
370
+ ### Empty State
371
+
372
+ ```tsx
373
+ import { Heading, Text } from '@frosted-ui/react-native';
374
+ import { View } from 'react-native';
375
+
376
+ <View style={{ alignItems: 'center', gap: 8 }}>
377
+ <Heading size="4">No results found</Heading>
378
+ <Text size="2" color="gray" style={{ textAlign: 'center' }}>
379
+ Try adjusting your search or filters
380
+ </Text>
381
+ </View>;
382
+ ```
383
+
384
+ ---
385
+
386
+ ## Typography Hierarchy Guidelines
387
+
388
+ ### Recommended Size Pairings
389
+
390
+ | Context | Heading Size | Body Size | Description Size |
391
+ | ------------ | ------------ | ---------- | ---------------- |
392
+ | Hero section | `8` or `9` | `3` or `4` | `2` |
393
+ | Page title | `6` or `7` | `2` or `3` | `2` |
394
+ | Section | `4` or `5` | `2` | `1` or `2` |
395
+ | Card | `3` or `4` | `2` | `1` |
396
+ | List item | `2` (medium) | — | `1` |
397
+ | Form field | — | `2` | `1` |
398
+
399
+ ### Visual Hierarchy Tips
400
+
401
+ 1. **Limit heading levels** — Use 2-3 heading sizes max per screen
402
+ 2. **Consistent spacing** — Use `gap: 4` between heading and description
403
+ 3. **Color for hierarchy** — Use `color="gray"` for secondary/description text
404
+ 4. **Weight for emphasis** — Use `weight="medium"` for labels, `weight="bold"` for headings
405
+
406
+ ---
407
+
408
+ ## ✅ DO's
409
+
410
+ ### Use the Frosted UI Text component
411
+
412
+ ```tsx
413
+ // ✅ Correct
414
+ import { Text } from '@frosted-ui/react-native';
415
+ <Text size="2">Hello world</Text>;
416
+ ```
417
+
418
+ ### Use semantic components
419
+
420
+ ```tsx
421
+ // ✅ Use Heading for titles
422
+ <Heading size="5">Section Title</Heading>
423
+
424
+ // ✅ Use Text for body content
425
+ <Text>Body content goes here</Text>
426
+
427
+ // ✅ Use Label for form labels
428
+ <Label>Email address</Label>
429
+
430
+ // ✅ Use Code for technical content
431
+ <Text>Install with <Code>npm install</Code></Text>
432
+ ```
433
+
434
+ ### Let components handle text styling
435
+
436
+ ```tsx
437
+ // ✅ Button handles text color and size automatically
438
+ <Button color="danger">
439
+ <Text>Delete</Text>
440
+ </Button>
441
+ ```
442
+
443
+ ### Use color="gray" for secondary text
444
+
445
+ ```tsx
446
+ // ✅ Gray for descriptions and helper text
447
+ <Text color="gray" size="2">
448
+ Optional helper text
449
+ </Text>
450
+ ```
451
+
452
+ ---
453
+
454
+ ## ❌ DON'Ts
455
+
456
+ ### Don't use React Native's Text
457
+
458
+ ```tsx
459
+ // ❌ Wrong
460
+ import { Text } from 'react-native';
461
+ ```
462
+
463
+ ### Don't manually style text inside components
464
+
465
+ ```tsx
466
+ // ❌ Don't override colors in buttons/badges
467
+ <Button variant="solid">
468
+ <Text style={{ color: 'white' }}>Submit</Text>
469
+ </Button>
470
+ ```
471
+
472
+ ### Don't use arbitrary font sizes
473
+
474
+ ```tsx
475
+ // ❌ Don't use custom font sizes
476
+ <Text style={{ fontSize: 15 }}>Custom size</Text>
477
+
478
+ // ✅ Use the typography scale
479
+ <Text size="2">Correct size</Text>
480
+ ```
481
+
482
+ ### Don't skip the size prop for intentional sizing
483
+
484
+ ```tsx
485
+ // ❌ Ambiguous - what size is this?
486
+ <Text>Some text</Text>
487
+
488
+ // ✅ Default size is mobile-friendly
489
+ <Text>Body text</Text> // Defaults to size="3"
490
+ ```
491
+
492
+ ---
493
+
494
+ ## Quick Reference
495
+
496
+ ### Text Sizes for Common Use Cases
497
+
498
+ | Use Case | Size |
499
+ | -------------------------- | ----------------------------- |
500
+ | Page title | `6` - `9` (Heading) |
501
+ | Section title | `4` - `5` (Heading) |
502
+ | Card title | `3` - `4` (Heading) |
503
+ | Body text | `3` (default) |
504
+ | Secondary/description text | `3` with `color="gray"` |
505
+ | Helper text | `1` - `2` with `color="gray"` |
506
+ | Small labels | `1` |
507
+ | Tiny captions | `0` |
508
+
509
+ ### Default Component Styling
510
+
511
+ | Component | Default Size | Default Weight |
512
+ | --------- | -------------------- | ---------------- |
513
+ | `Text` | `'3'` (mobile-first) | None (inherited) |
514
+ | `Heading` | `6` | `bold` |
515
+ | `Label` | `2` | `medium` |
516
+ | `Code` | `2` | None |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@frosted-ui/react-native",
3
- "version": "0.0.1-canary.93",
3
+ "version": "0.0.1-canary.95",
4
4
  "private": false,
5
5
  "main": "expo-router/entry",
6
6
  "types": "./dist/index.d.ts",
@@ -9,17 +9,21 @@
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
11
  "default": "./dist/index.js"
12
- }
12
+ },
13
+ "./llm-docs": "./docs/llm/README.md",
14
+ "./llm-docs/*": "./docs/llm/*"
13
15
  },
14
16
  "sideEffects": false,
15
17
  "license": "MIT",
16
18
  "files": [
17
- "dist"
19
+ "dist",
20
+ "docs/llm"
18
21
  ],
19
22
  "peerDependencies": {
20
23
  "lucide-react-native": ">=0.300.0",
21
24
  "react": ">=18.0.0",
22
25
  "react-native": ">=0.70.0",
26
+ "react-native-gesture-handler": ">=2.0.0",
23
27
  "react-native-reanimated": ">=3.0.0",
24
28
  "react-native-safe-area-context": ">=4.0.0",
25
29
  "react-native-screens": ">=3.0.0",
@@ -37,6 +41,7 @@
37
41
  },
38
42
  "dependencies": {
39
43
  "@frosted-ui/colors": "workspace:*",
44
+ "@rn-primitives/slider": "^1.2.0",
40
45
  "@rn-primitives/accordion": "^1.2.0",
41
46
  "@rn-primitives/alert-dialog": "^1.2.0",
42
47
  "@rn-primitives/aspect-ratio": "^1.2.0",
@@ -78,6 +83,7 @@
78
83
  "react": "19.1.0",
79
84
  "react-dom": "19.1.0",
80
85
  "react-native": "0.81.5",
86
+ "react-native-gesture-handler": "~2.24.0",
81
87
  "react-native-reanimated": "~4.1.1",
82
88
  "react-native-safe-area-context": "~5.6.0",
83
89
  "react-native-screens": "~4.16.0",