Variable Proximity(031)

Variable font weight and optical size fluidly responding to cursor distance.

Hover
Requires:motion
Loading…

Installation

$npx kibo add variable-proximity

Usage

1import { VariableProximity } from "@/components/kibo/variable-proximity/component";
2
3export default function Example() {
4 return (
5 <VariableProximity />
6 );
7}

Props Reference

PropTypeDefaultDescription
labelstring-Controls the label for the component animation.
fromFontVariationSettingsstring-Controls the from font variation settings for the component animation.
toFontVariationSettingsstring-Controls the to font variation settings for the component animation.
containerRefMutableRefObject<HTMLElement | null>-Controls the container ref for the component animation.
radiusnumber-Effect calculation radius in pixels from cursor position.
falloff'linear' | 'exponential' | 'gaussian'-Falloff curve calculation mode ('linear', 'exponential', 'gaussian').
classNamestring-Additional CSS classes for styling and layout.
onClick() => void-Controls the on click for the component animation.
styleCSSProperties-Controls the style for the component animation.