#075
Refraction layer
A LiquidGlass refraction layer using the regular optics preset behind a line of text in a padded frame.
Hand this to your AI. It names the exact library parts, timings and accessibility promises of this demo.
Build the "Refraction layer" pattern (@codeatlasdev/ui demo #075, surfaces/liquid-glass) in my app.
Call get_demo({ ids: ["#075"] }) first and keep its structure. It needs @codeatlasdev/[email protected].
Use: Adding a real refraction effect to a hero or overlay frame, using a preset from GLASS_OPTICS.
Keep these library parts, with the props and tokens the demo uses:
- LiquidGlass, GLASS_OPTICS from "@codeatlasdev/ui"
Behaviour to keep:
- `<LiquidGlass optics={GLASS_OPTICS.regular} />`
- Imports `LiquidGlass` and `GLASS_OPTICS` from `@codeatlasdev/ui`
- Sits in `<div class="frame">` with `position: relative` and `overflow: hidden`
- Foreground text: Refraction layer behind this text.
Reduced motion: the demo handles it; keep that branch.
Keyboard: not an interactive control.
Change only the copy and the data. Use the theme tokens (--ca-*), never raw colours. Library parts
- LiquidGlass
@codeatlasdev/ui
How it is built
- `<LiquidGlass optics={GLASS_OPTICS.regular} />`
- Imports `LiquidGlass` and `GLASS_OPTICS` from `@codeatlasdev/ui`
- Sits in `<div class="frame">` with `position: relative` and `overflow: hidden`
- Foreground text: Refraction layer behind this text.
Related
Loading source.