@sakaniui/react 0.4.1 → 0.4.2
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/README.md +4 -4
- package/dist/{TopBar-CqbWhR1n.js → TopBar-BN2DyH1y.js} +924 -633
- package/dist/TopBar-CepIdyw6.cjs +1 -0
- package/dist/blocks/LiquidDashboardBlock/parts/RailTooltip.d.ts +12 -0
- package/dist/blocks.cjs +2 -2
- package/dist/blocks.mjs +2138 -2021
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.mjs +528 -528
- package/dist/style.css +1 -1
- package/dist/tokens.css +24 -30
- package/package.json +1 -1
- package/dist/TopBar-D4DLhfly.cjs +0 -1
package/README.md
CHANGED
|
@@ -87,22 +87,22 @@ Glass is built into the theme system, not added component by component. Next to
|
|
|
87
87
|
</div>
|
|
88
88
|
|
|
89
89
|
// Liquid glass: a lens-refracting sheet over a photo, UI on top
|
|
90
|
-
import { LiquidGlass } from '@sakaniui/react';
|
|
90
|
+
import { LiquidBackdrop, LiquidGlass } from '@sakaniui/react';
|
|
91
91
|
|
|
92
|
-
<
|
|
92
|
+
<LiquidBackdrop src="photo.jpg" style={{ position: 'relative' }}> {/* every lens refracts this photo */}
|
|
93
93
|
<LiquidGlass variant="regular" tint="subtle" radius={0} style={{ position: 'absolute', inset: 0 }} />
|
|
94
94
|
<div data-surface="liquid" style={{ position: 'relative' }}>
|
|
95
95
|
<Sidebar /> {/* transparent: sits on the glass */}
|
|
96
96
|
<div data-surface="solid"><Card>…</Card></div> {/* data stays solid and crisp */}
|
|
97
97
|
</div>
|
|
98
|
-
</
|
|
98
|
+
</LiquidBackdrop>
|
|
99
99
|
```
|
|
100
100
|
|
|
101
101
|
The recipe is always the same three layers: **photo → one glass overlay → components**. See the full **Liquid Glass Dashboard** block (`@sakaniui/react/blocks`) for a complete example: a hovering lens that glides between sidebar items while the active item keeps its own, frosted menus, and solid data cards on a glass panel.
|
|
102
102
|
|
|
103
103
|
- **Browsers** — refraction renders in Chromium (Chrome, Edge); Safari and Firefox get a frosted fallback with the same rim and depth.
|
|
104
104
|
- **Accessible** — `prefers-reduced-transparency` turns glass into an opaque surface, `prefers-reduced-motion` stops the glare and glide; secondary text has its own stronger color token on glass, and the docs list measured contrast for every tint.
|
|
105
|
-
- **
|
|
105
|
+
- **Figma's Glass properties, 1:1** — refraction, depth, dispersion, frost and light are tokens in Figma's own units (`--liquid-refraction-clear: 0.8`, `--liquid-depth-clear: 20`, …), matching the liquid/regular and liquid/clear effect styles, or per element: `<LiquidGlass effect={{ refraction: 0.8, depth: 20 }}>`. `tint="subtle"` is Figma's 5% overlay fill, and `data-on-photo` switches a subtree to light text.
|
|
106
106
|
|
|
107
107
|
Docs: **[sakaniui.com/docs/glass](https://www.sakaniui.com/docs/glass)** · Storybook: *Foundations → Glass* and *Foundations → Liquid glass*.
|
|
108
108
|
|