module

Motion::HTML::WithDefaults

Set up defaults arguments for HTML tags.

This is automatically included in Pages and Components.

Instance methods

with_defaults

This is typically used in components and helper methods to set up defaults for reusable components.

Example in a page or component:

with_defaults field: form.email, class: "input" do |html| html.email_input placeholder: "Email" end

Is the same as:

email_input field: form.email, class: "input", placeholder: "Email"
Source

Nested types