Form Controls

Form controls are essential UI components that enable seamless user interaction in web applications. Our implementation combines Bootstrap's robust form elements with modern design patterns and enhanced accessibility features. From basic inputs to complex input groups, these controls help create intuitive and responsive forms.

Pro Tip: Enhance user experience by combining form controls with appropriate icons, validation feedback, and helper text. Always ensure proper ARIA attributes for accessibility.

Basic Form Controls

Basic Inputs

Basic form controls are the foundation of any form interface. Each type serves a specific purpose:

  • Basic Input: Standard text input for single-line text
  • Input with Label: Improves accessibility and user understanding
  • Input with Placeholder: Provides hint text that disappears when typing
  • Input with Value: Pre-populated input field
  • Border Style: Visual variation with dashed border
  • Password Input: Secure input that masks characters
Basic Input Examples
Loading...

Floating Labels

Floating labels provide an enhanced user experience by combining labels and placeholders. Available in two styles:

  • Outline: Modern look with outlined border
  • Filled: Solid background for stronger visual emphasis
The label floats above the input when focused or filled, maintaining context while typing.
Floating Labels Examples
Loading...

Special Input Types

Enhance form inputs with icons and special styling to provide better visual cues and improve usability:

  • Left Icon: Places an icon before the input text for context
  • Right Icon: Positions an icon after the input text
  • Combined: Can be used with other input features like validation states
Choose icons that clearly represent the input's purpose to enhance user understanding.
Special Input Examples
Loading...

Input States

Form controls can be configured with different states to indicate their interaction status:

  • Readonly Plain Text: Displays text that cannot be modified but can be copied
  • Readonly Input: Non-editable input that maintains form styling
  • Disabled Input: Completely inactive input that cannot be interacted with
Use appropriate states to guide users about which fields they can interact with.
Input State Examples
Loading...

Date and Time Inputs

HTML5 provides specialized input types for handling dates and times:

  • Date Input: Built-in calendar picker for selecting dates
  • Time Input: Time selection with hours and minutes
These inputs provide native browser controls and validation, improving user experience across devices.
Date and Time Input Examples
Loading...

Textarea and Color Picker

For more complex input needs:

  • Textarea: Multi-line text input ideal for longer content
  • Color Picker: Native color selection interface with hex value support
When using textareas, consider specifying an appropriate rows attribute based on the expected content length.
Textarea and Color Picker Examples
Loading...

Datalist and Rounded Inputs

Datalists provide suggestions as users type, while rounded inputs offer a softer visual style.

Datalist and Rounded Input Examples
Loading...

Input Variations

Input Sizing

Adjust input sizes to create visual hierarchy and emphasis:

  • Extra Small (.form-control-xs): Compact inputs for dense forms
  • Small (.form-control-sm): Reduced size for secondary inputs
  • Default: Standard size for most use cases
  • Large (.form-control-lg): Enhanced visibility for important fields
  • Extra Large (.form-control-xl): Maximum visibility for critical inputs
Maintain consistent sizing within form sections to ensure visual harmony.
Input Sizing Examples
Loading...

File Inputs

File inputs enable users to upload files to your application:

  • Default: Basic file selection with browser-native dialog
  • Multiple: Allows selection of multiple files simultaneously
  • Disabled: Prevents file uploads when needed
Consider adding accept attributes to limit file types and prevent invalid uploads.
File Input Examples
Loading...

File Input Sizing

File inputs can be sized using the same classes as regular inputs, from extra small (.form-control-xs) to extra large (.form-group-xl), providing flexibility in your form design.

File Input Sizing Examples
Loading...

Input Groups

Input groups combine form controls with additional elements:

  • Text Add-ons: Add context before or after inputs (e.g., @, $)
  • Button Add-ons: Add interactive elements like buttons
  • Multiple Add-ons: Combine multiple elements for complex inputs
  • Textarea Support: Works with multi-line inputs as well
Input groups enhance form functionality while maintaining a cohesive visual style.
Input Group Examples
Loading...

Input Group Sizing

Use size classes from input-group-xs to input-group-xl to modify the size of input groups. Each size is optimized for different use cases, from compact layouts to prominent form elements.

Input Group Sizing Examples
Loading...

Checkboxes and Radios in Input Groups

Combine selection controls with text inputs for advanced functionality:

  • Checkbox Groups: Toggle features or enable/disable input functionality
  • Radio Groups: Switch between different input modes or options
Always provide clear labels and proper ARIA attributes for accessibility.
Checkbox and Radio Examples
Loading...

Buttons and Dropdowns in Input Groups

Enhance input functionality with interactive elements:

  • Button Add-ons: Trigger actions directly related to the input
  • Multiple Buttons: Combine multiple actions in a single input group
  • Dropdown Integration: Add dropdown menus for additional options
Keep button actions contextually relevant to the input field they accompany.
Buttons and Dropdowns Examples
Loading...

On this page


Copyright © 2025 Your Company. All rights reserved.

Version 1.0.4