Components
Classes
Types
No results found.
If this is a bug, please report it.
Scroll
Open
State layers are absolutely-positioned div blocks that respond to mouse events on their PARENT element. By default, they change opacity in response, but they can be tweaked to do anything that's supported by a CSS transition.
<StateLayer bgColor="onprimary"></StateLayer>
Note: Other React frameworks are not currently supported, but they might still work. Try at your own risk.
Method | Instructions |
---|---|
LiftKit CLI |
From any Next.js project, run the following command in your terminal.
npm run add state-layer
content_copy
|
Github | open_in_new View on Github |
Method | Instructions |
---|---|
Webflow | open_in_new Clone from Made In Webflow |
Figma | open_in_new Clone from Figma Community |
Props unique to this component.
Name | Required | Type | Description | Default Val |
---|---|---|---|---|
bgColor | no | LkColor | "currentColor" | Background color of the state layer | undefined |
forcedState | no | "hover" | "active" | "focus" | Applies a static state manually (e.g., for selected options) | undefined |
Props with globally-defined behavior that are used in multiple components.