Input Fields

Simple

Text, email, password, and textarea inputs with validation states and interactive features

Updated about 1 month ago
Tested & Responsive

Live Demo

Basic Text Input

Simple text input with validation and required field handling

Simple
Preview:
Desktop view

Try it: Leave the field empty and click outside to see validation in action.

Resize to see how the component adapts to different screen sizes

📖 Basic Text Input Overview

Simple text input with validation and required field handling

Complexity: Simple

💡 Key Features

  • • Basic Text Input functionality with Stimulus controller
  • • Input fields, selects, checkboxes, and form validation components
  • • Responsive design optimized for all screen sizes
  • • Accessible markup with proper semantic HTML
  • • Modern CSS transitions and interactive effects
  • • Enhanced with input capabilities
  • • Enhanced with text capabilities
  • • Enhanced with email capabilities
  • • Enhanced with password capabilities
  • • Enhanced with textarea capabilities
  • • Enhanced with validation capabilities
  • • Enhanced with form capabilities

Email Input with Icon

Email input with validation, icon, and error states

Simple
Preview:
Desktop view

Try it: Enter an invalid email format and watch the icon color change along with validation feedback.

Resize to see how the component adapts to different screen sizes

📖 Email Input with Icon Overview

Email input with validation, icon, and error states

Complexity: Simple

💡 Key Features

  • • Email Input with Icon functionality with Stimulus controller
  • • Input fields, selects, checkboxes, and form validation components
  • • Responsive design optimized for all screen sizes
  • • Accessible markup with proper semantic HTML
  • • Modern CSS transitions and interactive effects
  • • Enhanced with input capabilities
  • • Enhanced with text capabilities
  • • Enhanced with email capabilities
  • • Enhanced with password capabilities
  • • Enhanced with textarea capabilities
  • • Enhanced with validation capabilities
  • • Enhanced with form capabilities

Password Input with Toggle

Password field with show/hide toggle functionality

Medium
Preview:
Desktop view

Try it: Click the eye icon to toggle password visibility. Enter less than 6 characters to see validation.

Resize to see how the component adapts to different screen sizes

📖 Password Input with Toggle Overview

Password field with show/hide toggle functionality

Complexity: Simple

💡 Key Features

  • • Password Input with Toggle functionality with Stimulus controller
  • • Input fields, selects, checkboxes, and form validation components
  • • Responsive design optimized for all screen sizes
  • • Accessible markup with proper semantic HTML
  • • Modern CSS transitions and interactive effects
  • • Enhanced with input capabilities
  • • Enhanced with text capabilities
  • • Enhanced with email capabilities
  • • Enhanced with password capabilities
  • • Enhanced with textarea capabilities
  • • Enhanced with validation capabilities
  • • Enhanced with form capabilities

Textarea with Counter

Textarea with character counter and length validation

Simple
Preview:
Desktop view

0/100

Try it: Start typing to see the character counter update. Notice how the color changes as you approach the limit.

Resize to see how the component adapts to different screen sizes

📖 Textarea with Counter Overview

Textarea with character counter and length validation

Complexity: Simple

💡 Key Features

  • • Textarea with Counter functionality with Stimulus controller
  • • Input fields, selects, checkboxes, and form validation components
  • • Responsive design optimized for all screen sizes
  • • Accessible markup with proper semantic HTML
  • • Modern CSS transitions and interactive effects
  • • Enhanced with input capabilities
  • • Enhanced with text capabilities
  • • Enhanced with email capabilities
  • • Enhanced with password capabilities
  • • Enhanced with textarea capabilities
  • • Enhanced with validation capabilities
  • • Enhanced with form capabilities

Installation & Usage

1

Copy the ERB template

Copy the ERB code from the template tab above and paste it into your Rails view file.

2

Add the Stimulus controller

Create the Stimulus controller file in your JavaScript controllers directory.