Protohiro Effects is a zero-wrapper React library for hard CSS effects like gradient borders, glow rings, and noise overlays.
https://libs.protohiro.com/effects/
@protohiro/effects-core: shared runtime utilities.@protohiro/effects: React hooks and effect styles.@protohiro/effects-demo: local demo app.
pnpm install
pnpm buildimport { useGradientBorderEffect } from '@protohiro/effects';
function Button() {
const ref = useGradientBorderEffect({ thickness: 2, angle: 90 });
return <button ref={ref}>Click</button>;
}Options:
thickness?: string | numberradius?: string | numbercolors?: stringangle?: string | numberdisabled?: boolean
Options:
color?: stringblur?: string | numberspread?: string | numberopacity?: numberdisabled?: boolean
Options:
size?: string | numberintensity?: numberdisabled?: boolean
gradient-border uses mask-composite for the preferred ring rendering path. Safari fallback uses a simplified border and layered background. The fallback keeps content readable and does not hide element content.
Hooks are composable because each effect writes only namespaced classes (pe-*) and CSS variables (--pe-*).
pnpm lint
pnpm typecheck
pnpm test
pnpm test:visual
pnpm size