@fluxglass/react
v0.0.1
Published
React components and hooks for Fluxglass liquid glass effects.
Maintainers
Readme
@fluxglass/react
The thin React adapter over @fluxglass/dom.
import { Fluxglass, useFluxglass } from '@fluxglass/react';
function Card() {
const glass = useFluxglass();
return (
<Fluxglass ref={glass.ref} renderer="auto" width={180} height={112}>
<button type="button">Continue</button>
</Fluxglass>
);
}width and height accept CSS pixels, CSS lengths such as "100%", or "auto" so stylesheets
can size [data-fluxglass-overlay].
The adapter is safe to render on the server, uses deterministic initial markup, updates an
existing DOM controller instead of recreating it for prop changes, and cleans up correctly under
React Strict Mode. LiquidGlass and useLiquidGlass remain available as compatibility names.
