Documentation Index
Fetch the complete documentation index at: https://mintlify.com/finsweet/attributes/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Thefs-inputactive attribute automatically adds and removes CSS classes on form input elements based on their active state. This enables custom styling for focused, filled, or active form fields.
Attribute Syntax
The attribute uses the following syntax:Settings
activeclass
Defines a custom active class to be added to input elements when they are active (focused or have a value). Default value:is-inputactive-active
Usage Examples
How It Works
The input active attribute:- Monitors all inputs on the page for changes
- Detects focus and value changes on input fields
- Adds the class when an input is active (has focus or contains a value)
- Removes the class when an input becomes inactive (loses focus and is empty)
- Works globally - no need to specify individual inputs
CSS Styling Examples
Use Cases
- Floating labels that move when an input has a value
- Visual feedback for form field states
- Custom focus styles beyond CSS :focus
- Persistent styling for filled inputs
- Parent element styling based on input state
The attribute initializes on page load and automatically monitors all inputs, so you don’t need to add attributes to individual input elements unless you want to customize the class name.