@expokit/cli 0.0.0-stage → 0.3.0
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/LICENSE +21 -0
- package/README.md +46 -2
- package/bin/expo-kit.js +1266 -0
- package/bin/lib.mjs +343 -0
- package/bin/mcp.mjs +345 -0
- package/package.json +49 -4
- package/registry/_docs/accordion.json +115 -0
- package/registry/_docs/action-sheet.json +138 -0
- package/registry/_docs/alert.json +155 -0
- package/registry/_docs/avatar.json +227 -0
- package/registry/_docs/badge.json +148 -0
- package/registry/_docs/bottom-nav.json +143 -0
- package/registry/_docs/bottom-sheet.json +186 -0
- package/registry/_docs/bullet.json +27 -0
- package/registry/_docs/button-3d.json +138 -0
- package/registry/_docs/button.json +131 -0
- package/registry/_docs/calendar.json +198 -0
- package/registry/_docs/card-stack.json +124 -0
- package/registry/_docs/card.json +131 -0
- package/registry/_docs/carousel.json +122 -0
- package/registry/_docs/chat.json +184 -0
- package/registry/_docs/checkbox.json +109 -0
- package/registry/_docs/checkout.json +105 -0
- package/registry/_docs/chip-group.json +132 -0
- package/registry/_docs/color-swatch.json +82 -0
- package/registry/_docs/confetti.json +102 -0
- package/registry/_docs/coupon.json +192 -0
- package/registry/_docs/cube-pager.json +100 -0
- package/registry/_docs/dashboard.json +123 -0
- package/registry/_docs/date-picker.json +269 -0
- package/registry/_docs/dialog.json +186 -0
- package/registry/_docs/drawer.json +199 -0
- package/registry/_docs/fab.json +144 -0
- package/registry/_docs/flip-card.json +127 -0
- package/registry/_docs/floating-input.json +211 -0
- package/registry/_docs/gift-card.json +124 -0
- package/registry/_docs/glass-button.json +142 -0
- package/registry/_docs/glass-nav-bar.json +102 -0
- package/registry/_docs/glass-search-bar.json +114 -0
- package/registry/_docs/glass-segmented.json +94 -0
- package/registry/_docs/glass-sheet.json +136 -0
- package/registry/_docs/glass-tab-bar.json +100 -0
- package/registry/_docs/glass.json +94 -0
- package/registry/_docs/inbox.json +75 -0
- package/registry/_docs/isometric-bar.json +75 -0
- package/registry/_docs/kit.json +14 -0
- package/registry/_docs/kpi-card.json +14 -0
- package/registry/_docs/like-button.json +92 -0
- package/registry/_docs/liquidglass-tab.json +30 -0
- package/registry/_docs/list-item.json +216 -0
- package/registry/_docs/loyalty-card.json +124 -0
- package/registry/_docs/morph-button.json +128 -0
- package/registry/_docs/number-ticker.json +112 -0
- package/registry/_docs/offers.json +81 -0
- package/registry/_docs/onboarding.json +69 -0
- package/registry/_docs/otp-input.json +158 -0
- package/registry/_docs/pagination-dots.json +108 -0
- package/registry/_docs/parallax-layers.json +104 -0
- package/registry/_docs/parallax-scroll.json +210 -0
- package/registry/_docs/password-input.json +112 -0
- package/registry/_docs/payment-card.json +169 -0
- package/registry/_docs/pixel-bar.json +69 -0
- package/registry/_docs/polar-area.json +81 -0
- package/registry/_docs/profile.json +87 -0
- package/registry/_docs/progress-steps.json +116 -0
- package/registry/_docs/progress.json +152 -0
- package/registry/_docs/radio-group.json +112 -0
- package/registry/_docs/rating.json +114 -0
- package/registry/_docs/ring-carousel.json +122 -0
- package/registry/_docs/scratch-card.json +110 -0
- package/registry/_docs/search-bar.json +160 -0
- package/registry/_docs/search-results.json +123 -0
- package/registry/_docs/segmented-control.json +123 -0
- package/registry/_docs/select.json +277 -0
- package/registry/_docs/settings.json +75 -0
- package/registry/_docs/shimmer-button.json +98 -0
- package/registry/_docs/sign-in.json +201 -0
- package/registry/_docs/skeleton.json +162 -0
- package/registry/_docs/slide-to-confirm.json +108 -0
- package/registry/_docs/slider.json +177 -0
- package/registry/_docs/spin-wheel.json +138 -0
- package/registry/_docs/spinner.json +121 -0
- package/registry/_docs/stateful-button.json +184 -0
- package/registry/_docs/stepper.json +184 -0
- package/registry/_docs/swipe-deck.json +118 -0
- package/registry/_docs/swipeable-row.json +95 -0
- package/registry/_docs/switch.json +124 -0
- package/registry/_docs/tabs.json +129 -0
- package/registry/_docs/tag-input.json +148 -0
- package/registry/_docs/text-animation.json +141 -0
- package/registry/_docs/textarea.json +191 -0
- package/registry/_docs/ticket-card.json +194 -0
- package/registry/_docs/ticket-shape.json +14 -0
- package/registry/_docs/tilt-card.json +157 -0
- package/registry/_docs/time-picker.json +269 -0
- package/registry/_docs/timeline-chart.json +33 -0
- package/registry/_docs/timeline.json +172 -0
- package/registry/_docs/toast.json +185 -0
- package/registry/_docs/treemap.json +33 -0
- package/registry/_docs/waterfall.json +39 -0
- package/registry/_docs/wheel-list.json +122 -0
- package/registry/accordion/files/src/components/ui/accordion.tsx +233 -0
- package/registry/accordion/files/src/lib/kit.tsx +219 -0
- package/registry/accordion.json +17 -0
- package/registry/action-sheet/files/src/components/ui/action-sheet.tsx +580 -0
- package/registry/action-sheet/files/src/lib/kit.tsx +219 -0
- package/registry/action-sheet.json +18 -0
- package/registry/alert/files/src/components/ui/alert.tsx +654 -0
- package/registry/alert/files/src/components/ui/button.tsx +274 -0
- package/registry/alert/files/src/lib/kit.tsx +219 -0
- package/registry/alert.json +20 -0
- package/registry/avatar/files/src/components/ui/avatar.tsx +790 -0
- package/registry/avatar/files/src/lib/kit.tsx +219 -0
- package/registry/avatar.json +18 -0
- package/registry/badge/files/src/components/ui/badge.tsx +626 -0
- package/registry/badge/files/src/lib/kit.tsx +219 -0
- package/registry/badge.json +17 -0
- package/registry/bottom-nav/files/src/components/ui/bottom-nav.tsx +1050 -0
- package/registry/bottom-nav/files/src/lib/kit.tsx +219 -0
- package/registry/bottom-nav.json +18 -0
- package/registry/bottom-sheet/files/src/components/ui/bottom-sheet.tsx +585 -0
- package/registry/bottom-sheet/files/src/lib/kit.tsx +219 -0
- package/registry/bottom-sheet.json +17 -0
- package/registry/bullet.json +14 -0
- package/registry/button/files/src/components/ui/button.tsx +274 -0
- package/registry/button/files/src/lib/kit.tsx +219 -0
- package/registry/button-3d/files/src/components/ui/button-3d.tsx +212 -0
- package/registry/button-3d/files/src/lib/kit.tsx +219 -0
- package/registry/button-3d.json +18 -0
- package/registry/button.json +18 -0
- package/registry/calendar/files/src/components/ui/calendar.tsx +822 -0
- package/registry/calendar/files/src/lib/kit.tsx +219 -0
- package/registry/calendar.json +17 -0
- package/registry/card/files/src/components/ui/card.tsx +300 -0
- package/registry/card/files/src/lib/kit.tsx +219 -0
- package/registry/card-stack.json +15 -0
- package/registry/card.json +17 -0
- package/registry/carousel.json +15 -0
- package/registry/chat.json +18 -0
- package/registry/checkbox/files/src/components/ui/checkbox.tsx +150 -0
- package/registry/checkbox/files/src/lib/kit.tsx +219 -0
- package/registry/checkbox.json +17 -0
- package/registry/checkout.json +26 -0
- package/registry/chip-group/files/src/components/ui/chip-group.tsx +269 -0
- package/registry/chip-group/files/src/lib/kit.tsx +219 -0
- package/registry/chip-group.json +17 -0
- package/registry/color-swatch.json +17 -0
- package/registry/confetti/files/src/components/ui/confetti.tsx +222 -0
- package/registry/confetti/files/src/lib/kit.tsx +219 -0
- package/registry/confetti.json +15 -0
- package/registry/coupon/files/src/components/ui/coupon.tsx +698 -0
- package/registry/coupon/files/src/components/ui/flip-card.tsx +205 -0
- package/registry/coupon/files/src/components/ui/tilt-card.tsx +635 -0
- package/registry/coupon/files/src/lib/kit.tsx +219 -0
- package/registry/coupon/files/src/lib/ticket-shape.tsx +543 -0
- package/registry/coupon.json +23 -0
- package/registry/cube-pager.json +15 -0
- package/registry/dashboard.json +32 -0
- package/registry/date-picker/files/src/components/ui/calendar.tsx +822 -0
- package/registry/date-picker/files/src/components/ui/date-picker.tsx +796 -0
- package/registry/date-picker/files/src/lib/kit.tsx +219 -0
- package/registry/date-picker.json +19 -0
- package/registry/dialog/files/src/components/ui/dialog.tsx +759 -0
- package/registry/dialog/files/src/lib/kit.tsx +219 -0
- package/registry/dialog.json +18 -0
- package/registry/drawer/files/src/components/ui/drawer.tsx +1135 -0
- package/registry/drawer/files/src/lib/kit.tsx +219 -0
- package/registry/drawer.json +18 -0
- package/registry/fab.json +18 -0
- package/registry/flip-card/files/src/components/ui/flip-card.tsx +205 -0
- package/registry/flip-card/files/src/lib/kit.tsx +219 -0
- package/registry/flip-card.json +15 -0
- package/registry/floating-input/files/src/components/ui/floating-input.tsx +528 -0
- package/registry/floating-input/files/src/lib/kit.tsx +219 -0
- package/registry/floating-input.json +17 -0
- package/registry/gift-card.json +21 -0
- package/registry/glass-button.json +22 -0
- package/registry/glass-nav-bar.json +21 -0
- package/registry/glass-search-bar.json +21 -0
- package/registry/glass-segmented.json +22 -0
- package/registry/glass-sheet.json +22 -0
- package/registry/glass-tab-bar.json +22 -0
- package/registry/glass.json +19 -0
- package/registry/inbox.json +30 -0
- package/registry/isometric-bar.json +14 -0
- package/registry/kit/files/src/lib/kit.tsx +219 -0
- package/registry/kit.json +11 -0
- package/registry/kpi-card/files/src/components/charts/kpi-card.tsx +45 -0
- package/registry/kpi-card.json +14 -0
- package/registry/like-button.json +18 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/_layout.tsx +97 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/alerts.tsx +5 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/explore.tsx +5 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/index.tsx +5 -0
- package/registry/liquidglass-tab/files/src/app/(tabs)/profile.tsx +5 -0
- package/registry/liquidglass-tab/files/src/app/_layout.tsx +33 -0
- package/registry/liquidglass-tab/files/src/components/GlassTabBar.tsx +259 -0
- package/registry/liquidglass-tab/files/src/components/TabScreen.tsx +122 -0
- package/registry/liquidglass-tab/files/src/lib/tab-bar.ts +61 -0
- package/registry/liquidglass-tab/files/src/lib/tab-icons.ts +130 -0
- package/registry/liquidglass-tab/files/src/lib/tabs.ts +108 -0
- package/registry/liquidglass-tab.json +23 -0
- package/registry/list-item/files/src/components/ui/list-item.tsx +508 -0
- package/registry/list-item/files/src/lib/kit.tsx +219 -0
- package/registry/list-item.json +17 -0
- package/registry/loyalty-card.json +23 -0
- package/registry/morph-button.json +18 -0
- package/registry/number-ticker.json +15 -0
- package/registry/offers.json +24 -0
- package/registry/onboarding.json +17 -0
- package/registry/otp-input/files/src/components/ui/otp-input.tsx +380 -0
- package/registry/otp-input/files/src/lib/kit.tsx +219 -0
- package/registry/otp-input.json +17 -0
- package/registry/pagination-dots/files/src/components/ui/pagination-dots.tsx +262 -0
- package/registry/pagination-dots/files/src/lib/kit.tsx +219 -0
- package/registry/pagination-dots.json +15 -0
- package/registry/parallax-layers.json +15 -0
- package/registry/parallax-scroll.json +17 -0
- package/registry/password-input/files/src/components/ui/floating-input.tsx +528 -0
- package/registry/password-input/files/src/components/ui/password-input.tsx +271 -0
- package/registry/password-input/files/src/lib/kit.tsx +219 -0
- package/registry/password-input.json +19 -0
- package/registry/payment-card/files/src/components/ui/flip-card.tsx +205 -0
- package/registry/payment-card/files/src/components/ui/payment-card.tsx +385 -0
- package/registry/payment-card/files/src/components/ui/tilt-card.tsx +635 -0
- package/registry/payment-card/files/src/lib/kit.tsx +219 -0
- package/registry/payment-card.json +21 -0
- package/registry/pixel-bar.json +14 -0
- package/registry/polar-area.json +14 -0
- package/registry/profile.json +17 -0
- package/registry/progress/files/src/components/ui/progress.tsx +883 -0
- package/registry/progress/files/src/lib/kit.tsx +219 -0
- package/registry/progress-steps/files/src/components/ui/progress-steps.tsx +559 -0
- package/registry/progress-steps/files/src/lib/kit.tsx +219 -0
- package/registry/progress-steps.json +18 -0
- package/registry/progress.json +17 -0
- package/registry/radio-group/files/src/components/ui/radio-group.tsx +327 -0
- package/registry/radio-group/files/src/lib/kit.tsx +219 -0
- package/registry/radio-group.json +18 -0
- package/registry/rating.json +18 -0
- package/registry/ring-carousel.json +15 -0
- package/registry/scratch-card.json +18 -0
- package/registry/search-bar/files/src/components/ui/search-bar.tsx +530 -0
- package/registry/search-bar/files/src/lib/kit.tsx +219 -0
- package/registry/search-bar.json +17 -0
- package/registry/search-results.json +30 -0
- package/registry/segmented-control/files/src/components/ui/segmented-control.tsx +341 -0
- package/registry/segmented-control/files/src/lib/kit.tsx +219 -0
- package/registry/segmented-control.json +18 -0
- package/registry/select/files/src/components/ui/select.tsx +1398 -0
- package/registry/select/files/src/lib/kit.tsx +219 -0
- package/registry/select.json +17 -0
- package/registry/settings.json +26 -0
- package/registry/shimmer-button.json +17 -0
- package/registry/sign-in.json +26 -0
- package/registry/skeleton/files/src/components/ui/skeleton.tsx +799 -0
- package/registry/skeleton/files/src/lib/kit.tsx +219 -0
- package/registry/skeleton.json +17 -0
- package/registry/slide-to-confirm.json +18 -0
- package/registry/slider/files/src/components/ui/slider.tsx +716 -0
- package/registry/slider/files/src/lib/kit.tsx +219 -0
- package/registry/slider.json +17 -0
- package/registry/spin-wheel.json +18 -0
- package/registry/spinner/files/src/components/ui/spinner.tsx +748 -0
- package/registry/spinner/files/src/lib/kit.tsx +219 -0
- package/registry/spinner.json +17 -0
- package/registry/stateful-button/files/src/components/ui/stateful-button.tsx +532 -0
- package/registry/stateful-button/files/src/lib/kit.tsx +219 -0
- package/registry/stateful-button.json +18 -0
- package/registry/stepper/files/src/components/ui/stepper.tsx +646 -0
- package/registry/stepper/files/src/lib/kit.tsx +219 -0
- package/registry/stepper.json +17 -0
- package/registry/swipe-deck.json +15 -0
- package/registry/swipeable-row.json +15 -0
- package/registry/switch/files/src/components/ui/switch.tsx +344 -0
- package/registry/switch/files/src/lib/kit.tsx +219 -0
- package/registry/switch.json +18 -0
- package/registry/tabs/files/src/components/ui/tabs.tsx +539 -0
- package/registry/tabs/files/src/lib/kit.tsx +219 -0
- package/registry/tabs.json +17 -0
- package/registry/tag-input/files/src/components/ui/tag-input.tsx +720 -0
- package/registry/tag-input/files/src/lib/kit.tsx +219 -0
- package/registry/tag-input.json +17 -0
- package/registry/text-animation/files/src/components/ui/text-animation.tsx +650 -0
- package/registry/text-animation/files/src/lib/kit.tsx +219 -0
- package/registry/text-animation.json +15 -0
- package/registry/textarea/files/src/components/ui/textarea.tsx +553 -0
- package/registry/textarea/files/src/lib/kit.tsx +219 -0
- package/registry/textarea.json +17 -0
- package/registry/ticket-card.json +24 -0
- package/registry/ticket-shape/files/src/lib/kit.tsx +219 -0
- package/registry/ticket-shape/files/src/lib/ticket-shape.tsx +543 -0
- package/registry/ticket-shape.json +17 -0
- package/registry/tilt-card/files/src/components/ui/tilt-card.tsx +635 -0
- package/registry/tilt-card/files/src/lib/kit.tsx +219 -0
- package/registry/tilt-card.json +17 -0
- package/registry/time-picker/files/src/components/ui/time-picker.tsx +1159 -0
- package/registry/time-picker/files/src/lib/kit.tsx +219 -0
- package/registry/time-picker.json +17 -0
- package/registry/timeline/files/src/components/ui/avatar.tsx +790 -0
- package/registry/timeline/files/src/components/ui/timeline.tsx +1059 -0
- package/registry/timeline/files/src/lib/kit.tsx +219 -0
- package/registry/timeline-chart.json +14 -0
- package/registry/timeline.json +20 -0
- package/registry/toast/files/src/components/ui/button.tsx +274 -0
- package/registry/toast/files/src/components/ui/toast.tsx +1284 -0
- package/registry/toast/files/src/lib/kit.tsx +219 -0
- package/registry/toast.json +20 -0
- package/registry/treemap.json +14 -0
- package/registry/waterfall.json +14 -0
- package/registry/wheel-list.json +17 -0
- package/schema/components.schema.json +13 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "floating-input",
|
|
3
|
+
"category": "Inputs",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "FloatingInput",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/floating-input.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": "A text field whose label glides onto the border as an accent halo blooms.",
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"label",
|
|
13
|
+
"string",
|
|
14
|
+
"—",
|
|
15
|
+
"Placeholder that floats onto the border."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"floatingLabel",
|
|
19
|
+
"boolean",
|
|
20
|
+
"true",
|
|
21
|
+
"Set to false to put the label above the field as static text (no notch) and show placeholder inside; filled and underline work too."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"variant",
|
|
25
|
+
"\"outlined\" | \"filled\" | \"underline\"",
|
|
26
|
+
"\"outlined\"",
|
|
27
|
+
"Notched outline, rounded filled, or bare underline (filled/underline bars grow from the centre on focus)."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"size",
|
|
31
|
+
"\"sm\" | \"md\" | \"lg\"",
|
|
32
|
+
"\"md\"",
|
|
33
|
+
"44 / 54 / 64pt — font, padding, radius and icons scale too."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"error",
|
|
37
|
+
"string",
|
|
38
|
+
"—",
|
|
39
|
+
"Red state, icon + message that slides in, one shake."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"success",
|
|
43
|
+
"boolean | string",
|
|
44
|
+
"—",
|
|
45
|
+
"Green border + animated check; a string is shown as the message."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"helper",
|
|
49
|
+
"string",
|
|
50
|
+
"—",
|
|
51
|
+
"Hint under the field."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"prefix / suffix",
|
|
55
|
+
"string",
|
|
56
|
+
"—",
|
|
57
|
+
"Inline text like \"₹\", \"+91\", \"INR\" — fades in when the label floats."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"counter",
|
|
61
|
+
"boolean",
|
|
62
|
+
"false",
|
|
63
|
+
"Shows length/maxLength under the field (needs maxLength)."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"left / right",
|
|
67
|
+
"ReactNode",
|
|
68
|
+
"—",
|
|
69
|
+
"Icons or adornments inside the field."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"clearable",
|
|
73
|
+
"boolean",
|
|
74
|
+
"false",
|
|
75
|
+
"Animated SVG clear button while there's text."
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"accent",
|
|
79
|
+
"string",
|
|
80
|
+
"theme accent",
|
|
81
|
+
"Focus border, halo and label colour."
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"surface",
|
|
85
|
+
"string",
|
|
86
|
+
"theme background",
|
|
87
|
+
"Colour behind the field (paints the notch)."
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"style",
|
|
91
|
+
"StyleProp<ViewStyle>",
|
|
92
|
+
"—",
|
|
93
|
+
"Style for the outer wrapper around the field and message line (the one that shakes)."
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"fieldStyle",
|
|
97
|
+
"StyleProp<ViewStyle>",
|
|
98
|
+
"—",
|
|
99
|
+
"The bordered box: background, border width / colour, radius, height, padding. Wins over the computed style; a borderColor replaces the resting border only (focus, error and success colours still show). A numeric height / borderRadius re-centres the label and resizes the halo."
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"inputStyle",
|
|
103
|
+
"StyleProp<TextStyle>",
|
|
104
|
+
"—",
|
|
105
|
+
"The typed text — fontSize, fontWeight, color, letterSpacing, fontFamily."
|
|
106
|
+
],
|
|
107
|
+
[
|
|
108
|
+
"labelStyle",
|
|
109
|
+
"StyleProp<TextStyle>",
|
|
110
|
+
"—",
|
|
111
|
+
"Label in both modes (floating and above). color is the resting colour — focus (accent), error and success still take over; fontSize sets the resting size, it floats at the same ratio and the notch follows its width."
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
"messageStyle",
|
|
115
|
+
"StyleProp<TextStyle>",
|
|
116
|
+
"—",
|
|
117
|
+
"Helper / error / success text. color applies to the helper; error and success keep their tone colour."
|
|
118
|
+
],
|
|
119
|
+
[
|
|
120
|
+
"prefixStyle / suffixStyle",
|
|
121
|
+
"StyleProp<TextStyle>",
|
|
122
|
+
"—",
|
|
123
|
+
"Prefix / suffix text (still fades in with the label)."
|
|
124
|
+
],
|
|
125
|
+
[
|
|
126
|
+
"counterStyle",
|
|
127
|
+
"StyleProp<TextStyle>",
|
|
128
|
+
"—",
|
|
129
|
+
"The length/maxLength counter; turns danger at the limit regardless."
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
"placeholderTextColor",
|
|
133
|
+
"string",
|
|
134
|
+
"theme mutedForeground",
|
|
135
|
+
"Placeholder colour (floatingLabel={false})."
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
"iconColor",
|
|
139
|
+
"string",
|
|
140
|
+
"theme mutedForeground",
|
|
141
|
+
"Clear button colour at rest."
|
|
142
|
+
],
|
|
143
|
+
[
|
|
144
|
+
"…TextInputProps",
|
|
145
|
+
"",
|
|
146
|
+
"",
|
|
147
|
+
"Everything TextInput accepts."
|
|
148
|
+
]
|
|
149
|
+
],
|
|
150
|
+
"behavior": [
|
|
151
|
+
[
|
|
152
|
+
"Touch",
|
|
153
|
+
"Tapping anywhere on the field focuses the input. With clearable, a × springs in once there is text and empties the field."
|
|
154
|
+
],
|
|
155
|
+
[
|
|
156
|
+
"Motion",
|
|
157
|
+
"The label springs onto the border on focus or when filled, and a soft halo blooms around the field. An error shakes it once; a success check springs in."
|
|
158
|
+
],
|
|
159
|
+
[
|
|
160
|
+
"Screen readers",
|
|
161
|
+
"The input is labelled with your label and the clear button reads \"Clear\" plus the label. Helper, error and success messages are polite live regions."
|
|
162
|
+
],
|
|
163
|
+
[
|
|
164
|
+
"Web",
|
|
165
|
+
"Browser autofill floats the label too, and the field keeps its own background instead of the autofill blue."
|
|
166
|
+
]
|
|
167
|
+
],
|
|
168
|
+
"usage": "import { useState } from 'react';\nimport { FloatingInput } from '@/components/ui/floating-input';\n\nconst [email, setEmail] = useState('');\n<FloatingInput label=\"Email\" value={email} onChangeText={setEmail} keyboardType=\"email-address\" clearable />",
|
|
169
|
+
"examples": [
|
|
170
|
+
{
|
|
171
|
+
"name": "SignUp",
|
|
172
|
+
"title": "Sign Up",
|
|
173
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction Card({ title, subtitle, children }: { title: string; subtitle?: string; children: React.ReactNode }) {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n padding: 16,\n gap: 12,\n borderRadius: radius.xl,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: colors.border,\n backgroundColor: colors.card,\n }}\n >\n <View style={{ gap: 2, marginBottom: 2 }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground }}>{title}</Text>\n {subtitle ? <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{subtitle}</Text> : null}\n </View>\n {children}\n </View>\n );\n}\n\nconst isEmail = (v: string) => /^\\S+@\\S+\\.\\S{2,}$/.test(v);\n\nexport default function SignUp() {\n const { colors } = useKit();\n const [name, setName] = useState('Priya Sharma');\n const [email, setEmail] = useState('priya@');\n const [phone, setPhone] = useState('');\n const emailError = email.length > 0 && !isEmail(email) ? 'Enter a valid email address' : undefined;\n return (\n <Card title=\"Create your account\" subtitle=\"It takes less than a minute.\">\n <FloatingInput label=\"Full name\" value={name} onChangeText={setName} autoComplete=\"name\" clearable />\n <FloatingInput\n label=\"Email\"\n value={email}\n onChangeText={setEmail}\n keyboardType=\"email-address\"\n autoCapitalize=\"none\"\n autoCorrect={false}\n error={emailError}\n success={isEmail(email) ? 'Looks good' : undefined}\n />\n <FloatingInput\n label=\"Mobile number\"\n prefix=\"+91\"\n value={phone}\n onChangeText={(v) => setPhone(v.replace(/\\D/g, ''))}\n keyboardType=\"phone-pad\"\n maxLength={10}\n success={phone.length === 10}\n helper=\"We'll text you a 6-digit code\"\n />\n <Text style={{ fontSize: 13, color: colors.mutedForeground }}>\n Already have an account? <Text style={{ fontWeight: '400', color: colors.accent }}>Sign in</Text>\n </Text>\n </Card>\n );\n}\n"
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"name": "Payment",
|
|
177
|
+
"title": "Payment",
|
|
178
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction Card({ title, subtitle, children }: { title: string; subtitle?: string; children: React.ReactNode }) {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n padding: 16,\n gap: 12,\n borderRadius: radius.xl,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: colors.border,\n backgroundColor: colors.card,\n }}\n >\n <View style={{ gap: 2, marginBottom: 2 }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground }}>{title}</Text>\n {subtitle ? <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{subtitle}</Text> : null}\n </View>\n {children}\n </View>\n );\n}\n\nconst formatCard = (v: string) =>\n v\n .replace(/\\D/g, '')\n .slice(0, 16)\n .replace(/(\\d{4})(?=\\d)/g, '$1 ');\n\nconst formatExpiry = (v: string) => {\n const d = v.replace(/\\D/g, '').slice(0, 4);\n return d.length > 2 ? `${d.slice(0, 2)}/${d.slice(2)}` : d;\n};\n\nconst cardBrand = (v: string) => {\n const d = v.replace(/\\D/g, '');\n if (/^4/.test(d)) return 'VISA';\n if (/^(5[1-5]|2[2-7])/.test(d)) return 'MC';\n if (/^3[47]/.test(d)) return 'AMEX';\n return undefined;\n};\n\n/** '' = not finished yet, otherwise an error message or null when valid. */\nconst expiryError = (v: string): string | null | '' => {\n if (v.length < 5) return '';\n const month = Number(v.slice(0, 2));\n const year = 2000 + Number(v.slice(3));\n if (month < 1 || month > 12) return 'Month must be 01–12';\n const now = new Date();\n if (year < now.getFullYear() || (year === now.getFullYear() && month < now.getMonth() + 1)) return 'This card has expired';\n return null;\n};\n\nconst rupees = (n: number) => {\n const [int, frac] = n.toFixed(2).split('.');\n return `₹${int.replace(/(\\d)(?=(\\d\\d)+\\d$)/g, '$1,')}${frac === '00' ? '' : `.${frac}`}`;\n};\n\nexport default function Payment() {\n const { colors, radius } = useKit();\n const [amount, setAmount] = useState('1299');\n const [card, setCard] = useState('4242 4242 4242 4242');\n const [expiry, setExpiry] = useState('');\n const [cvc, setCvc] = useState('');\n const [paid, setPaid] = useState(false);\n const brand = cardBrand(card);\n const cvcLen = brand === 'AMEX' ? 4 : 3;\n const expErr = expiryError(expiry);\n const ready = Number(amount) > 0 && card.length >= 18 && expErr === null && cvc.length === cvcLen;\n return (\n <Card title=\"Add funds\" subtitle=\"Charged securely — you can cancel anytime.\">\n <FloatingInput label=\"Amount\" prefix=\"₹\" suffix=\"INR\" keyboardType=\"decimal-pad\" value={amount} onChangeText={setAmount} />\n <FloatingInput\n label=\"Card number\"\n keyboardType=\"number-pad\"\n autoComplete=\"cc-number\"\n value={card}\n onChangeText={(v) => setCard(formatCard(v))}\n maxLength={19}\n suffix={brand}\n success={card.length === 19}\n />\n <View style={{ flexDirection: 'row', gap: 10, alignItems: 'flex-start' }}>\n <FloatingInput\n label=\"MM/YY\"\n keyboardType=\"number-pad\"\n autoComplete=\"cc-exp\"\n value={expiry}\n onChangeText={(v) => setExpiry(formatExpiry(v))}\n maxLength={5}\n error={expErr || undefined}\n success={expErr === null}\n style={{ flex: 1 }}\n />\n <FloatingInput\n label=\"CVC\"\n keyboardType=\"number-pad\"\n autoComplete=\"cc-csc\"\n secureTextEntry\n value={cvc}\n onChangeText={(v) => setCvc(v.replace(/\\D/g, '').slice(0, cvcLen))}\n maxLength={cvcLen}\n helper={`${cvcLen} digits on the ${brand === 'AMEX' ? 'front' : 'back'}`}\n style={{ flex: 1 }}\n />\n </View>\n <Pressable\n disabled={!ready}\n onPress={() => setPaid(true)}\n accessibilityRole=\"button\"\n accessibilityState={{ disabled: !ready }}\n style={({ pressed }) => ({\n height: 50,\n marginTop: 4,\n borderRadius: radius.md,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: ready ? colors.accent : colors.muted,\n opacity: pressed ? 0.85 : 1,\n })}\n >\n <Text style={{ fontSize: 16, fontWeight: '400', color: ready ? readableOn(colors.accent) : colors.mutedForeground }}>\n {paid ? 'Paid ✓' : `Pay ${rupees(Number(amount) || 0)}`}\n </Text>\n </Pressable>\n </Card>\n );\n}\n"
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"name": "Variants",
|
|
182
|
+
"title": "Variants",
|
|
183
|
+
"code": "import { Pressable, StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\n\nexport default function Variants() {\n return (\n <View style={{ gap: 18 }}>\n <FloatingInput label=\"Outlined\" defaultValue=\"Notch cuts the border\" helper=\"Tap to see the focus halo\" />\n <FloatingInput variant=\"filled\" label=\"Filled\" defaultValue=\"Bar grows from the centre\" />\n <FloatingInput variant=\"underline\" label=\"Underline\" defaultValue=\"Minimal, for dense forms\" />\n </View>\n );\n}\n"
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
"name": "States",
|
|
187
|
+
"title": "States",
|
|
188
|
+
"code": "import { Pressable, StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\n\nexport default function States() {\n return (\n <View style={{ gap: 16 }}>\n <FloatingInput label=\"Username\" defaultValue=\"admin\" error=\"That username is already taken\" />\n <FloatingInput label=\"Username\" defaultValue=\"priya.codes\" success=\"Nice — it's available\" />\n <FloatingInput label=\"Workspace\" defaultValue=\"Acme Inc.\" editable={false} helper=\"Only owners can rename the workspace\" />\n </View>\n );\n}\n"
|
|
189
|
+
},
|
|
190
|
+
{
|
|
191
|
+
"name": "Website",
|
|
192
|
+
"title": "Website",
|
|
193
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction Card({ title, subtitle, children }: { title: string; subtitle?: string; children: React.ReactNode }) {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n padding: 16,\n gap: 12,\n borderRadius: radius.xl,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: colors.border,\n backgroundColor: colors.card,\n }}\n >\n <View style={{ gap: 2, marginBottom: 2 }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground }}>{title}</Text>\n {subtitle ? <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{subtitle}</Text> : null}\n </View>\n {children}\n </View>\n );\n}\n\nexport default function Website() {\n const [slug, setSlug] = useState('');\n return (\n <Card title=\"Your public page\">\n <FloatingInput\n label=\"Website\"\n prefix=\"https://\"\n keyboardType=\"url\"\n autoCapitalize=\"none\"\n autoCorrect={false}\n clearable\n />\n <FloatingInput\n label=\"Handle\"\n prefix=\"@\"\n suffix=\".expo.page\"\n value={slug}\n onChangeText={(v) => setSlug(v.toLowerCase().replace(/[^a-z0-9-]/g, ''))}\n autoCapitalize=\"none\"\n maxLength={20}\n counter\n helper=\"Letters, numbers and dashes\"\n />\n </Card>\n );\n}\n"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
"name": "Sizes",
|
|
197
|
+
"title": "Sizes",
|
|
198
|
+
"code": "import { Pressable, StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\n\nexport default function Sizes() {\n return (\n <View style={{ gap: 14 }}>\n <FloatingInput size=\"sm\" label=\"Small · 44pt\" defaultValue=\"Compact filters and toolbars\" clearable />\n <FloatingInput size=\"md\" label=\"Medium · 54pt\" defaultValue=\"The default for forms\" clearable />\n <FloatingInput size=\"lg\" label=\"Large · 64pt\" defaultValue=\"Hero fields\" clearable />\n </View>\n );\n}\n"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"name": "LabelAbove",
|
|
202
|
+
"title": "Label Above",
|
|
203
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction Card({ title, subtitle, children }: { title: string; subtitle?: string; children: React.ReactNode }) {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n padding: 16,\n gap: 12,\n borderRadius: radius.xl,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: colors.border,\n backgroundColor: colors.card,\n }}\n >\n <View style={{ gap: 2, marginBottom: 2 }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground }}>{title}</Text>\n {subtitle ? <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{subtitle}</Text> : null}\n </View>\n {children}\n </View>\n );\n}\n\nconst isEmail = (v: string) => /^\\S+@\\S+\\.\\S{2,}$/.test(v);\n\nexport default function LabelAbove() {\n const [name, setName] = useState('');\n const [email, setEmail] = useState('');\n const [bio, setBio] = useState('');\n return (\n <Card title=\"Edit profile\" subtitle=\"This is how others will see you.\">\n <FloatingInput floatingLabel={false} label=\"Full name\" placeholder=\"Priya Sharma\" value={name} onChangeText={setName} autoComplete=\"name\" clearable />\n <FloatingInput\n floatingLabel={false}\n label=\"Email\"\n placeholder=\"you@example.com\"\n value={email}\n onChangeText={setEmail}\n keyboardType=\"email-address\"\n autoCapitalize=\"none\"\n autoCorrect={false}\n error={email.length > 0 && !isEmail(email) ? 'Enter a valid email address' : undefined}\n helper=\"We'll never share it.\"\n />\n <FloatingInput\n floatingLabel={false}\n label=\"Bio\"\n placeholder=\"A line about you\"\n value={bio}\n onChangeText={setBio}\n maxLength={80}\n counter\n />\n </Card>\n );\n}\n"
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
"name": "CustomStyles",
|
|
207
|
+
"title": "Custom Styles",
|
|
208
|
+
"code": "import React, { useState } from 'react';\nimport { Pressable, StyleSheet, Text, View } from 'react-native';\nimport { FloatingInput } from '@/components/ui/floating-input';\nimport { readableOn, useKit } from '@/lib/kit';\n\nfunction Card({ title, subtitle, children }: { title: string; subtitle?: string; children: React.ReactNode }) {\n const { colors, radius } = useKit();\n return (\n <View\n style={{\n padding: 16,\n gap: 12,\n borderRadius: radius.xl,\n borderWidth: StyleSheet.hairlineWidth,\n borderColor: colors.border,\n backgroundColor: colors.card,\n }}\n >\n <View style={{ gap: 2, marginBottom: 2 }}>\n <Text style={{ fontSize: 16, fontWeight: '400', color: colors.foreground }}>{title}</Text>\n {subtitle ? <Text style={{ fontSize: 13, color: colors.mutedForeground }}>{subtitle}</Text> : null}\n </View>\n {children}\n </View>\n );\n}\n\nexport default function CustomStyles() {\n const { colors, radius } = useKit();\n const [handle, setHandle] = useState('priya.codes');\n return (\n <Card title=\"Custom styles\" subtitle=\"fieldStyle, labelStyle, inputStyle, messageStyle.\">\n <FloatingInput\n label=\"Username\"\n prefix=\"@\"\n value={handle}\n onChangeText={setHandle}\n autoCapitalize=\"none\"\n autoCorrect={false}\n helper=\"Letters, numbers and dots.\"\n fieldStyle={{ borderWidth: 2, borderColor: colors.border, borderRadius: radius.lg, backgroundColor: colors.card }}\n surface={colors.card}\n labelStyle={{ fontSize: 15, fontWeight: '400', letterSpacing: 0.2 }}\n inputStyle={{ fontSize: 17, fontWeight: '400', letterSpacing: 0.3 }}\n prefixStyle={{ color: colors.accent, fontWeight: '400' }}\n messageStyle={{ fontStyle: 'italic' }}\n />\n </Card>\n );\n}\n"
|
|
209
|
+
}
|
|
210
|
+
]
|
|
211
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "gift-card",
|
|
3
|
+
"category": "3D",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "GiftCard",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/gift-card.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": "A photo gift card that tilts toward your finger and flips to reveal its code.",
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"amount",
|
|
13
|
+
"string",
|
|
14
|
+
"—",
|
|
15
|
+
"Formatted amount, e.g. \"₹2,000\"."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"brand",
|
|
19
|
+
"string",
|
|
20
|
+
"—",
|
|
21
|
+
"Store / brand, top-left."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"message",
|
|
25
|
+
"string",
|
|
26
|
+
"—",
|
|
27
|
+
"Short note on the front."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"from / to",
|
|
31
|
+
"string",
|
|
32
|
+
"—",
|
|
33
|
+
"Who sent it and who it's for."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"code",
|
|
37
|
+
"string",
|
|
38
|
+
"—",
|
|
39
|
+
"Redeem code, revealed on the back (grouped in fours)."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"validity",
|
|
43
|
+
"string",
|
|
44
|
+
"—",
|
|
45
|
+
"Expiry line on the back."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"onCopy",
|
|
49
|
+
"(code: string) => void",
|
|
50
|
+
"—",
|
|
51
|
+
"Shows a Copy button — wire it to expo-clipboard."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"image",
|
|
55
|
+
"ImageSourcePropType",
|
|
56
|
+
"deep plum",
|
|
57
|
+
"Card art — a photo or texture (require() or { uri })."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"tone",
|
|
61
|
+
"\"light\" | \"dark\"",
|
|
62
|
+
"\"light\"",
|
|
63
|
+
"Light text for dark art, dark text for pale art."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"redeemed",
|
|
67
|
+
"boolean",
|
|
68
|
+
"false",
|
|
69
|
+
"Dim the card with a Redeemed label."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"flipped / defaultFlipped / onFlip",
|
|
73
|
+
"boolean / boolean / (flipped) => void",
|
|
74
|
+
"— / false / —",
|
|
75
|
+
"Controlled or uncontrolled side."
|
|
76
|
+
],
|
|
77
|
+
[
|
|
78
|
+
"tilt",
|
|
79
|
+
"boolean",
|
|
80
|
+
"true",
|
|
81
|
+
"Tilt toward the finger."
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"radius",
|
|
85
|
+
"number",
|
|
86
|
+
"18",
|
|
87
|
+
"Corner radius."
|
|
88
|
+
],
|
|
89
|
+
[
|
|
90
|
+
"background",
|
|
91
|
+
"string",
|
|
92
|
+
"\"#2a1630\"",
|
|
93
|
+
"Card colour when there is no image."
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"labels",
|
|
97
|
+
"{ tag?, for?, from?, redeemed?, code?, back?, copy?, copied? }",
|
|
98
|
+
"English",
|
|
99
|
+
"Every built-in string, for translation."
|
|
100
|
+
],
|
|
101
|
+
[
|
|
102
|
+
"style",
|
|
103
|
+
"StyleProp<ViewStyle>",
|
|
104
|
+
"—",
|
|
105
|
+
"Style for the root."
|
|
106
|
+
]
|
|
107
|
+
],
|
|
108
|
+
"behavior": [
|
|
109
|
+
[
|
|
110
|
+
"Touch",
|
|
111
|
+
"Tap the card to flip it over to the redeem code. The copy button calls onCopy and reads \"Copied ✓\" for a moment."
|
|
112
|
+
],
|
|
113
|
+
[
|
|
114
|
+
"Motion",
|
|
115
|
+
"With tilt on (the default) the card leans toward your finger with a moving reflection, then turns over in 3D on a spring."
|
|
116
|
+
],
|
|
117
|
+
[
|
|
118
|
+
"Screen readers",
|
|
119
|
+
"The card is a button labelled with the brand, amount and redeemed state; the code is added to the label once it is flipped."
|
|
120
|
+
]
|
|
121
|
+
],
|
|
122
|
+
"usage": null,
|
|
123
|
+
"examples": []
|
|
124
|
+
}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "glass-button",
|
|
3
|
+
"category": "Glass",
|
|
4
|
+
"aliases": [
|
|
5
|
+
"liquid-glass-button",
|
|
6
|
+
"glass-toolbar",
|
|
7
|
+
"floating-controls"
|
|
8
|
+
],
|
|
9
|
+
"exportName": "GlassButton",
|
|
10
|
+
"files": [
|
|
11
|
+
"src/components/ui/glass-button.tsx"
|
|
12
|
+
],
|
|
13
|
+
"summary": "Liquid Glass buttons and toolbars that spring down under your finger.",
|
|
14
|
+
"props": [
|
|
15
|
+
[
|
|
16
|
+
"label",
|
|
17
|
+
"string",
|
|
18
|
+
"—",
|
|
19
|
+
"Button text. Leave it out (with an icon) for a circular icon button."
|
|
20
|
+
],
|
|
21
|
+
[
|
|
22
|
+
"icon",
|
|
23
|
+
"ReactNode",
|
|
24
|
+
"—",
|
|
25
|
+
"Icon before the label. `useGlassButtonInk({ variant, tint, scheme })` returns the colour to draw it in."
|
|
26
|
+
],
|
|
27
|
+
[
|
|
28
|
+
"size",
|
|
29
|
+
"'sm' | 'md' | 'lg'",
|
|
30
|
+
"'md'",
|
|
31
|
+
"Height 36 / 44 / 52; icon-only buttons are circles of that size. `GLASS_ICON_SIZE[size]` is the matching icon size."
|
|
32
|
+
],
|
|
33
|
+
[
|
|
34
|
+
"variant",
|
|
35
|
+
"'glass' | 'tinted'",
|
|
36
|
+
"'glass'",
|
|
37
|
+
"Plain monochrome glass, or glass washed with `tint` — the label switches to black or white to stay readable."
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
"tint",
|
|
41
|
+
"string",
|
|
42
|
+
"kit accent",
|
|
43
|
+
"Wash colour for the tinted variant."
|
|
44
|
+
],
|
|
45
|
+
[
|
|
46
|
+
"scheme",
|
|
47
|
+
"'light' | 'dark'",
|
|
48
|
+
"kit theme",
|
|
49
|
+
"Force light or dark glass, e.g. 'dark' over photos."
|
|
50
|
+
],
|
|
51
|
+
[
|
|
52
|
+
"onPress / disabled",
|
|
53
|
+
"() => void / boolean",
|
|
54
|
+
"— / false",
|
|
55
|
+
"Press handler; disabled dims the button and blocks presses."
|
|
56
|
+
],
|
|
57
|
+
[
|
|
58
|
+
"haptics",
|
|
59
|
+
"boolean",
|
|
60
|
+
"true",
|
|
61
|
+
"Light impact on press."
|
|
62
|
+
],
|
|
63
|
+
[
|
|
64
|
+
"accessibilityLabel",
|
|
65
|
+
"string",
|
|
66
|
+
"label",
|
|
67
|
+
"Required for icon-only buttons."
|
|
68
|
+
],
|
|
69
|
+
[
|
|
70
|
+
"style",
|
|
71
|
+
"StyleProp<ViewStyle>",
|
|
72
|
+
"—",
|
|
73
|
+
"Outer style: margins, position, width or flex (buttons hug their content by default)."
|
|
74
|
+
],
|
|
75
|
+
[
|
|
76
|
+
"GlassToolbar items",
|
|
77
|
+
"{ key, icon, label, onPress?, active?, disabled? }[]",
|
|
78
|
+
"—",
|
|
79
|
+
"Icon buttons. `icon` is a node or `({ color, size, active }) => node`; `label` is the accessibility label; `active` draws a soft bubble in the accent colour."
|
|
80
|
+
],
|
|
81
|
+
[
|
|
82
|
+
"GlassToolbar size",
|
|
83
|
+
"'sm' | 'md' | 'lg'",
|
|
84
|
+
"'md'",
|
|
85
|
+
"Item size, 36 / 44 / 52."
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"GlassToolbar floating",
|
|
89
|
+
"boolean",
|
|
90
|
+
"false",
|
|
91
|
+
"A cluster of separate glass circles (melting together on iOS 26) instead of one capsule."
|
|
92
|
+
],
|
|
93
|
+
[
|
|
94
|
+
"GlassToolbar direction",
|
|
95
|
+
"'row' | 'column'",
|
|
96
|
+
"'row'",
|
|
97
|
+
"Lay items out horizontally or vertically (map-style controls)."
|
|
98
|
+
],
|
|
99
|
+
[
|
|
100
|
+
"GlassToolbar separators / gap",
|
|
101
|
+
"boolean / number",
|
|
102
|
+
"true / 8",
|
|
103
|
+
"Hairlines between capsule items; space between floating circles."
|
|
104
|
+
],
|
|
105
|
+
[
|
|
106
|
+
"GlassToolbar accent",
|
|
107
|
+
"string",
|
|
108
|
+
"kit accent (glass ink)",
|
|
109
|
+
"Colour of active items."
|
|
110
|
+
],
|
|
111
|
+
[
|
|
112
|
+
"GlassToolbar scheme / haptics / accessibilityLabel / style",
|
|
113
|
+
"—",
|
|
114
|
+
"kit theme / true / — / —",
|
|
115
|
+
"As on GlassButton; accessibilityLabel names the toolbar."
|
|
116
|
+
]
|
|
117
|
+
],
|
|
118
|
+
"behavior": [
|
|
119
|
+
[
|
|
120
|
+
"Motion",
|
|
121
|
+
"Buttons spring down to 0.94 and toolbar icons to 0.86 while pressed, and an active toolbar item springs in a soft bubble. On iOS 26 a GlassButton lets the native glass bounce instead."
|
|
122
|
+
],
|
|
123
|
+
[
|
|
124
|
+
"Reduced motion",
|
|
125
|
+
"Press springs are skipped and the active bubble appears without a spring."
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"Haptics",
|
|
129
|
+
"A light impact on every press, unless haptics is false."
|
|
130
|
+
],
|
|
131
|
+
[
|
|
132
|
+
"Screen readers",
|
|
133
|
+
"Each button has the button role with its label and disabled state; toolbar items also report selected. The toolbar itself has the toolbar role."
|
|
134
|
+
],
|
|
135
|
+
[
|
|
136
|
+
"Platforms",
|
|
137
|
+
"iOS 26 shows real interactive Liquid Glass, tinted natively, and floating toolbar circles melt together. Elsewhere it is blurred glass with a stronger colour wash for tinted buttons."
|
|
138
|
+
]
|
|
139
|
+
],
|
|
140
|
+
"usage": null,
|
|
141
|
+
"examples": []
|
|
142
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "glass-nav-bar",
|
|
3
|
+
"category": "Glass",
|
|
4
|
+
"aliases": [],
|
|
5
|
+
"exportName": "GlassNavBar",
|
|
6
|
+
"files": [
|
|
7
|
+
"src/components/ui/glass-nav-bar.tsx"
|
|
8
|
+
],
|
|
9
|
+
"summary": "An iOS 26 glass top bar that fades in as content scrolls under it.",
|
|
10
|
+
"props": [
|
|
11
|
+
[
|
|
12
|
+
"title",
|
|
13
|
+
"string",
|
|
14
|
+
"—",
|
|
15
|
+
"Centred bar title (and the large title when largeTitle is on)."
|
|
16
|
+
],
|
|
17
|
+
[
|
|
18
|
+
"largeTitle",
|
|
19
|
+
"boolean",
|
|
20
|
+
"false",
|
|
21
|
+
"Big title under the bar that scrolls away while the small centred title fades in. Needs scrollY."
|
|
22
|
+
],
|
|
23
|
+
[
|
|
24
|
+
"scrollY",
|
|
25
|
+
"Animated.Value",
|
|
26
|
+
"—",
|
|
27
|
+
"Your scroll view's offset (useGlassNavScroll). The glass fades in over ~40pt as content passes under the bar; without it the bar is solid glass."
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"onBack",
|
|
31
|
+
"() => void",
|
|
32
|
+
"—",
|
|
33
|
+
"Shows a round glass back button with a chevron."
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"backLabel",
|
|
37
|
+
"string",
|
|
38
|
+
"—",
|
|
39
|
+
"Text beside the chevron (the button becomes a pill) and its accessibility label; \"Back\" otherwise."
|
|
40
|
+
],
|
|
41
|
+
[
|
|
42
|
+
"actions",
|
|
43
|
+
"{ key, icon, onPress, accessibilityLabel }[]",
|
|
44
|
+
"[]",
|
|
45
|
+
"Round glass buttons on the right, grouped so they merge on iOS 26."
|
|
46
|
+
],
|
|
47
|
+
[
|
|
48
|
+
"scheme",
|
|
49
|
+
"'light' | 'dark'",
|
|
50
|
+
"kit theme",
|
|
51
|
+
"Force light or dark glass and ink, e.g. over a photo."
|
|
52
|
+
],
|
|
53
|
+
[
|
|
54
|
+
"topInset",
|
|
55
|
+
"number",
|
|
56
|
+
"0",
|
|
57
|
+
"Space above the bar for the status bar — pass your safe-area top inset."
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"style",
|
|
61
|
+
"StyleProp<ViewStyle>",
|
|
62
|
+
"—",
|
|
63
|
+
"Style for the bar container, which pins to the top of its parent."
|
|
64
|
+
],
|
|
65
|
+
[
|
|
66
|
+
"useGlassNavScroll(listener?)",
|
|
67
|
+
"hook → { scrollY, onScroll }",
|
|
68
|
+
"—",
|
|
69
|
+
"Native-driver Animated.event for an Animated.ScrollView / FlatList (scrollEventThrottle 16)."
|
|
70
|
+
],
|
|
71
|
+
[
|
|
72
|
+
"GLASS_NAV_HEIGHT / glassNavInset({ largeTitle, topInset })",
|
|
73
|
+
"number / function",
|
|
74
|
+
"54",
|
|
75
|
+
"Bar row height, and the full height the bar covers — use it as your content's paddingTop."
|
|
76
|
+
]
|
|
77
|
+
],
|
|
78
|
+
"behavior": [
|
|
79
|
+
[
|
|
80
|
+
"Motion",
|
|
81
|
+
"With scrollY the bar starts transparent and its glass fades in as content passes under it. A large title scrolls away while the small centred title fades in, all on the native driver."
|
|
82
|
+
],
|
|
83
|
+
[
|
|
84
|
+
"Touch",
|
|
85
|
+
"Back and action buttons spring down under the finger on emulated glass; on iOS 26 the interactive glass bounces natively."
|
|
86
|
+
],
|
|
87
|
+
[
|
|
88
|
+
"Reduced motion",
|
|
89
|
+
"The large title no longer scales on pull-down or collapse, and the button press springs are off."
|
|
90
|
+
],
|
|
91
|
+
[
|
|
92
|
+
"Screen readers",
|
|
93
|
+
"The title is a header, with the small title hidden while the large one shows. The back button reads backLabel or \"Back\", and actions use their accessibilityLabel."
|
|
94
|
+
],
|
|
95
|
+
[
|
|
96
|
+
"Platforms",
|
|
97
|
+
"Real Liquid Glass on iOS 26, where the action buttons merge together. Blur on older iOS, Android and web."
|
|
98
|
+
]
|
|
99
|
+
],
|
|
100
|
+
"usage": null,
|
|
101
|
+
"examples": []
|
|
102
|
+
}
|