HoverFill is a component that displays a light background when hovering on it.
HoverFill will show background based on the hover origin.
HoverFill can be used as a light button:
import Springen from 'springen';<Springen.HoverFill bgClassName="rounded-md"><button className="inline-flex items-center justify-center gap-0.5 h-9 px-3 text-sm">light-button</button></Springen.HoverFill>
HoverFill can be used as a light card:
import Springen from 'springen';<Springen.HoverFill bgClassName="rounded-lg"><div className="flex p-4 gap-3 w-[356px]"></div></Springen.HoverFill>
When HoverFills share the same parent as siblings, they will automatically share one background when you hover from one to another.
Make sure not to set overflow: hidden
on the parent element, otherwise don’t use this component.
Props | Description | Type | Default |
---|---|---|---|
hoverColor | The color of the hover | string | "" |
activeColor | The color of the active | string | "" |
bgClassName | The class name of the background | string | "" |
bgStyle | The style of the background | React.CSSProperties | {} |