glacia-native 0.3.2 → 0.3.3
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 +1 -7
- package/README.md +178 -0
- package/package.json +2 -2
package/LICENSE
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026
|
|
3
|
+
Copyright (c) 2026 Kelvin Zhang
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -19,9 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
19
19
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
20
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
Attribution and Third-Party Notices:
|
|
26
|
-
- Web glass engine based on Glisse by Kelvin Zhang (MIT): https://github.com/0kzh/glisse
|
|
27
|
-
- React Native glass powered by @callstack/liquid-glass (MIT): https://github.com/callstack/liquid-glass
|
package/README.md
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Glacia Native (`glacia-native`)
|
|
2
|
+
|
|
3
|
+
> **Apple's Liquid Glass UI components for React Native & Expo.**
|
|
4
|
+
> Real iOS 26 `UIGlassEffect` with authentic fallback on Android and older iOS.
|
|
5
|
+
|
|
6
|
+
[](https://www.npmjs.com/package/glacia-native)
|
|
7
|
+
[](https://github.com/binyamfeyissa/Glacia/blob/main/LICENSE)
|
|
8
|
+
[](https://glacia.binyamfeyissa.dev)
|
|
9
|
+
[](https://github.com/binyamfeyissa/Glacia)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Overview
|
|
14
|
+
|
|
15
|
+
**`glacia-native`** brings the physical material of Apple's iOS 26 Liquid Glass to React Native applications:
|
|
16
|
+
|
|
17
|
+
- **Native iOS 26 Material:** Uses `@callstack/liquid-glass` to render Apple's authentic native `UIGlassEffect` on supported devices.
|
|
18
|
+
- **Graceful Fallback Ladder:** On older iOS versions and Android, falls back to a tuned visual hierarchy with frosted translucency, matching layout geometry, and zero runtime crashes.
|
|
19
|
+
- **Physical Spring Animations:** Native spring interactions for presses, toggles, slider scrubbing, and tab transitions.
|
|
20
|
+
- **Human Interface Guidelines (HIG):** Designed to match Apple's native tactile controls, radii, and typography scales.
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
Install `glacia-native` and its peer dependencies:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install glacia-native glacia-tokens @callstack/liquid-glass
|
|
30
|
+
# or
|
|
31
|
+
pnpm add glacia-native glacia-tokens @callstack/liquid-glass
|
|
32
|
+
# or
|
|
33
|
+
yarn add glacia-native glacia-tokens @callstack/liquid-glass
|
|
34
|
+
# or
|
|
35
|
+
bun add glacia-native glacia-tokens @callstack/liquid-glass
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Expo Projects
|
|
39
|
+
|
|
40
|
+
If using Expo, ensure you are running in Expo Prebuild / Development Build (`npx expo run:ios` or `npx expo run:android`) to support the native iOS glass module.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Quickstart
|
|
45
|
+
|
|
46
|
+
```tsx
|
|
47
|
+
import React, { useState } from "react";
|
|
48
|
+
import { View, Text, StyleSheet } from "react-native";
|
|
49
|
+
import { Glass, Button, Switch, Slider, SegmentedControl, Card } from "glacia-native";
|
|
50
|
+
|
|
51
|
+
export function App() {
|
|
52
|
+
const [active, setActive] = useState(true);
|
|
53
|
+
const [sliderVal, setSliderVal] = useState(65);
|
|
54
|
+
const [segment, setSegment] = useState("overview");
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<View style={styles.container}>
|
|
58
|
+
{/* Liquid Glass Card */}
|
|
59
|
+
<Glass effect="regular" style={styles.glassCard}>
|
|
60
|
+
<Text style={styles.title}>Apple Account</Text>
|
|
61
|
+
<Text style={styles.subtitle}>Liquid Glass React Native</Text>
|
|
62
|
+
|
|
63
|
+
<SegmentedControl
|
|
64
|
+
segments={["Overview", "Optics", "Security"]}
|
|
65
|
+
selectedIndex={["Overview", "Optics", "Security"].indexOf(segment)}
|
|
66
|
+
onChange={(index) => setSegment(["Overview", "Optics", "Security"][index])}
|
|
67
|
+
style={styles.segmented}
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<View style={styles.row}>
|
|
71
|
+
<Text style={styles.label}>Passkey Authentication</Text>
|
|
72
|
+
<Switch value={active} onValueChange={setActive} />
|
|
73
|
+
</View>
|
|
74
|
+
|
|
75
|
+
<View style={styles.sliderContainer}>
|
|
76
|
+
<Text style={styles.label}>Transmission: {sliderVal}%</Text>
|
|
77
|
+
<Slider value={sliderVal} onValueChange={setSliderVal} minimumValue={0} maximumValue={100} />
|
|
78
|
+
</View>
|
|
79
|
+
|
|
80
|
+
<Button variant="glass" onPress={() => console.log("Pressed!")}>
|
|
81
|
+
Save Changes
|
|
82
|
+
</Button>
|
|
83
|
+
</Glass>
|
|
84
|
+
</View>
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const styles = StyleSheet.create({
|
|
89
|
+
container: {
|
|
90
|
+
flex: 1,
|
|
91
|
+
backgroundColor: "#0a0f1d",
|
|
92
|
+
justifyContent: "center",
|
|
93
|
+
alignItems: "center",
|
|
94
|
+
padding: 20,
|
|
95
|
+
},
|
|
96
|
+
glassCard: {
|
|
97
|
+
width: "100%",
|
|
98
|
+
maxWidth: 400,
|
|
99
|
+
padding: 24,
|
|
100
|
+
borderRadius: 24,
|
|
101
|
+
},
|
|
102
|
+
title: {
|
|
103
|
+
fontSize: 20,
|
|
104
|
+
fontWeight: "700",
|
|
105
|
+
color: "#ffffff",
|
|
106
|
+
marginBottom: 4,
|
|
107
|
+
},
|
|
108
|
+
subtitle: {
|
|
109
|
+
fontSize: 14,
|
|
110
|
+
color: "rgba(255, 255, 255, 0.6)",
|
|
111
|
+
marginBottom: 16,
|
|
112
|
+
},
|
|
113
|
+
segmented: {
|
|
114
|
+
marginVertical: 12,
|
|
115
|
+
},
|
|
116
|
+
row: {
|
|
117
|
+
flexDirection: "row",
|
|
118
|
+
justifyContent: "space-between",
|
|
119
|
+
alignItems: "center",
|
|
120
|
+
marginVertical: 12,
|
|
121
|
+
},
|
|
122
|
+
sliderContainer: {
|
|
123
|
+
marginVertical: 12,
|
|
124
|
+
},
|
|
125
|
+
label: {
|
|
126
|
+
color: "#ffffff",
|
|
127
|
+
fontSize: 14,
|
|
128
|
+
marginBottom: 8,
|
|
129
|
+
},
|
|
130
|
+
});
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Component Catalog
|
|
136
|
+
|
|
137
|
+
| Component | Description |
|
|
138
|
+
| :--- | :--- |
|
|
139
|
+
| **`<Glass />`** | Core material view rendering native `UIGlassEffect` on iOS 26 and calibrated fallback on other platforms. |
|
|
140
|
+
| **`<Button />`** | Interactive button with `filled`, `glass`, and `ghost` variants with haptic and spring feedback. |
|
|
141
|
+
| **`<Card />`** | Liquid glass content container with `CardHeader`, `CardTitle`, `CardDescription`, `CardContent`, and `CardFooter`. |
|
|
142
|
+
| **`<SegmentedControl />`** | Apple-style segmented picker with animated sliding thumb indicator. |
|
|
143
|
+
| **`<Switch />`** | Physical toggle switch with specular lighting and smooth spring state transitions. |
|
|
144
|
+
| **`<Slider />`** | Continuous slider control with custom track lighting and glass thumb. |
|
|
145
|
+
| **`<TabBar />`** | Bottom navigation bar floating with real optical material. |
|
|
146
|
+
| **`<Tabs />`** | Tab switching layout with animated glass selector indicator. |
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Optical Diagnostics
|
|
151
|
+
|
|
152
|
+
You can check whether the running device supports Apple's native `UIGlassEffect` at runtime:
|
|
153
|
+
|
|
154
|
+
```tsx
|
|
155
|
+
import { isGlassSupported } from "glacia-native";
|
|
156
|
+
|
|
157
|
+
if (isGlassSupported()) {
|
|
158
|
+
console.log("Hardware-accelerated iOS 26 UIGlassEffect active!");
|
|
159
|
+
} else {
|
|
160
|
+
console.log("Using calibrated cross-platform fallback.");
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Ecosystem
|
|
167
|
+
|
|
168
|
+
- **[`glacia`](https://www.npmjs.com/package/glacia)**: Core React web component library with CLI support.
|
|
169
|
+
- **[`glacia-tokens`](https://www.npmjs.com/package/glacia-tokens)**: Shared cross-platform design tokens and optical formulas.
|
|
170
|
+
- **`glacia-native`**: Liquid Glass for React Native & Expo with iOS 26 `UIGlassEffect`.
|
|
171
|
+
|
|
172
|
+
---
|
|
173
|
+
|
|
174
|
+
## Links
|
|
175
|
+
|
|
176
|
+
- **Documentation**: [https://glacia.binyamfeyissa.dev/](https://glacia.binyamfeyissa.dev/)
|
|
177
|
+
- **GitHub**: [https://github.com/binyamfeyissa/Glacia](https://github.com/binyamfeyissa/Glacia)
|
|
178
|
+
- **License**: MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "glacia-native",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"description": "Liquid Glass UI components for React Native — real iOS 26 glass, with a clean fallback on Android and older iOS.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"@callstack/liquid-glass": ">=0.7.0"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"glacia-tokens": "0.3.
|
|
29
|
+
"glacia-tokens": "0.3.3"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@testing-library/react": "^16.3.3",
|