Menu
render Input.new(type: :email, placeholder: "Enter your email address")
Add the component to your project
Run the following command in your terminal
bundle exec essence add input
Copy and paste the following code into your project
# frozen_string_literal: true
class Components::Input < Components::Essence
def initialize(**attributes)
super(**attributes)
end
def view_template(&)
input(**attributes)
end
private
def component_classes
{
_: {
_: "flex px-4 h-10 md:h-12 rounded-sm border border-gray-200/80 ring-gray-950/5 focus:outline-none focus:ring-offset-1 focus-visible:ring-1"
}
}.freeze
end
end