Customise SimpleForm inputs
11 March 2022 (Updated 11 March 2022)
Let’s suppose you want to edit the string inputs. Create a file at app/inputs/string_input.rb
:
# frozen_string_literal: true
class StringInput < SimpleForm::Inputs::StringInput
def input_html_classes
super.push('block w-full')
end
end
You can view list of SimpleForm’s default inputs here.
Tagged:
Rails tooling
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment