Input Group
A text input with optional prefix and suffix addons for icons, text, or buttons. Supports both form builder mode (with Rails form objects) and standalone usage. Addons can be inline (inside the input) or addon-style (separate visual block).
Preview & Code
_input_group.html.erb
███
█████ █████ █████████ █████████
█████ ████ ████ ████████
███ █████████ ██████ █████ ██ ███ ██
███ ██████ █████████████████████████ █████ ██ ██████████ █████████
██████ ██████████ ██████████████ ███████████ ████████████ █████████████ ██
██ ███ ██
██████████ █████ ████ ██████ ███████
input_group_component.rb
█ ██████████████████████ ████
█████ ███████████████████ █ ███████████████████
███████████ ████████
███████████ █████████
███████████ ██████ ███████████ ██████ ███████ ███████ ██████ ██████
█████████████ ████████ ████████ ███████████████ ████████████████
██████████ ██████████ ██████
input_group_component.html.erb
████ ███████████████
██ ██ ███████████████ ██
██████ ████████ ████████ ███ ██████████ █████████████ ████
███ ██████ ██
██ ██ █████████ ██
█████ ███████████████████ ████████████████
██ ███ ██
████████
██ ███ ██
Changelog
- Initial release with form builder and standalone modes
- Inline prefix/suffix support (icons, text)
- Addon block support (leading_addon, trailing_addon)
- ViewComponent slots for custom addon content
- Automatic error detection from Rails form objects
- Dark mode support
Get Full Access
Unlock the source code for this component and all others. One-time payment for lifetime access.
Get Access Now