class Components::Elements::Input

Overview

Represents the element - form input

Included Modules

Defined in:

components/elements/forms/input.cr

Constructors

Class Method Summary

Instance methods inherited from module Components::Elements::UrlAttributeValidation

set_attribute(name : String, value : String | Nil) : self set_attribute

Instance methods inherited from class Components::Elements::VoidElement

<<(child : HTMLElement | String) : self <<, add_child(child : HTMLElement | String) : self add_child, can_have_children? : Bool can_have_children?, render : String render, void_element? : Bool void_element?

Constructor methods inherited from class Components::Elements::VoidElement

new(tag_name : String, **attrs) new

Instance methods inherited from class Components::Elements::HTMLElement

[](name : String) : String | Nil [], add_class(class_names : String) : self add_class, add_style(styles : String) : self add_style, attributes : Hash(String, String) attributes, can_have_children? : Bool can_have_children?, children : Array(HTMLElement | String | RawHTML) children, has_class?(class_name : String) : Bool has_class?, remove_attribute(name : String) : self remove_attribute, remove_class(class_names : String) : self remove_class, render : String render, set_attribute(name : String, value : String | Nil) : self set_attribute, set_safe_style(style : SafeStyleValue) : self set_safe_style, set_safe_url_attribute(name : String, url : SafeURL) : self set_safe_url_attribute, tag_name : String tag_name, to_s(io : IO) : Nil to_s, void_element? : Bool void_element?

Constructor methods inherited from class Components::Elements::HTMLElement

new(tag_name : String, **attrs) new

Constructor Detail

def self.new(**attrs) #

[View source]

Class Method Detail

def self.button(value : String) #

[View source]
def self.checkbox(name : String, value : String | Nil = nil) #

[View source]
def self.color(name : String) #

[View source]
def self.date(name : String) #

[View source]
def self.datetime_local(name : String) #

[View source]
def self.email(name : String) #

[View source]
def self.file(name : String) #

[View source]
def self.hidden(name : String, value : String) #

[View source]
def self.number(name : String) #

[View source]
def self.password(name : String) #

[View source]
def self.radio(name : String, value : String) #

[View source]
def self.range(name : String, min : String | Nil = nil, max : String | Nil = nil) #

[View source]
def self.search(name : String) #

[View source]
def self.submit(value : String = "Submit") #

[View source]
def self.tel(name : String) #

[View source]
def self.text(name : String) #

Convenience constructors for common input types


[View source]
def self.time(name : String) #

[View source]
def self.url(name : String) #

[View source]