module Lucky::TagDefaults

Overview

Set up defaults arguments for HTML tags.

This is automatically included in Pages and Components.

Direct including types

Defined in:

lucky/tags/tag_defaults.cr

Instance Method Summary

Instance Method Detail

def tag_defaults(**named_args, &) #

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

Example in a page or component:

tag_defaults field: form.email, class: "input" do |tag_builder| tag_builder.email_input placeholder: "Email" end

Is the same as:

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

[View source]