Classes
The following classes are available globally.
-
This class is responsible for managing attributes of HTML elements
See moreDeclaration
Swift
public final class Attribute
-
Define a base class to containered tag elements
See moreDeclaration
Swift
public class ContainerElementBase : GenericElement
-
Base Class for all HTML elements implement
See moreDeclaration
Swift
public class GenericElement : ElementProtocol
-
This is a Base class for Input Elements
See moreDeclaration
Swift
public class InputElementBase : GenericElement
-
This is a Base class for Table Column Elements
See moreDeclaration
Swift
public class TableColumnBase : GenericElement
-
This is a Base class for Table Row Elements
See moreDeclaration
Swift
public class TableRowBase : GenericElement
-
This is a Base class for Typography Elements
See moreDeclaration
Swift
public class TypographyElementBase : GenericElement
-
A tag element class
Usage Example:
See morelet link = Link(("href","https://micheltlutz.me"), ("target","_blank")) link.add("Developed by Michel Lutz - micheltlutz.me 🚀")
Declaration
Swift
public final class A : ContainerElementBase
-
Blockquote tag element class
Usage Example:
See morelet description = Blockquote() description.add("This is Typography blockquote demo.")
Declaration
Swift
public final class Blockquote : ContainerElementBase
-
Declaration
Swift
public final class Br : GenericElement
-
Button tag element class
Usage Example:
See morelet section = Section(("id","buttons"), ("class","container")) let title = H3("Buttons") title.addAttribute(("class","title")) section.add(title) let description = Blockquote() description.add("This is Buttons demo.") section.add(description) let linkButton = Link(("href","#"), ("class","button")) linkButton.add("Default Button") section.add(linkButton) let button = Button("Outlined Button") button.addAttribute(("class","button button-outline") ) section.add(button) let inputSubmit = Submit("Clear Button") inputSubmit.addAttribute(("class","button button-clear") ) section.add(section.add(inputSubmit)) return section
Declaration
Swift
public class Button : TypographyElementBase
-
Canvas tag element class
See moreDeclaration
Swift
public final class Canvas : ContainerElementBase
-
Center tag element class
See moreDeclaration
Swift
public final class Center : ContainerElementBase
-
Code tag element class
See moreDeclaration
Swift
public final class Code : TypographyElementBase
-
Div tag element class
### Usage Example: ###
See morelet div = Div(("class", "float-right")) div.add("Test Div")
Declaration
Swift
public final class Div : ContainerElementBase
-
Declaration
Swift
public final class Em : TypographyElementBase
-
Fieldset tag element class
### Usage Example: ###
See morelet fieldset = Fieldset() let labelName = Label("Name") labelName.addAttribute(("for", "nameField")) fieldset.add(labelName) let inputName = InputText("", id: "nameField", placeholder: "Name") fieldset.add(inputName) let labelAge = Label("Age Range") labelAge.addAttribute(("for", "ageRangeField")) fieldset.add(labelAge)
Declaration
Swift
final class Fieldset : GenericElement
-
Form tag element class
### Usage Example: ###
See morelet form = Form((("method"),("POST"))) let fieldset = Fieldset() let labelName = Label("Name") labelName.addAttribute(("for", "nameField")) fieldset.add(labelName) let inputName = InputText("", id: "nameField", placeholder: "Name") fieldset.add(inputName) let labelAge = Label("Age Range") labelAge.addAttribute(("for", "ageRangeField")) fieldset.add(labelAge) form.add(fieldset)
Declaration
Swift
public final class Form : GenericElement
-
Declaration
Swift
public final class H1 : TypographyElementBase
-
Declaration
Swift
public final class H2 : TypographyElementBase
-
Declaration
Swift
public final class H3 : TypographyElementBase
-
Declaration
Swift
public final class H4 : TypographyElementBase
-
Declaration
Swift
public final class H5 : TypographyElementBase
-
Declaration
Swift
public final class H6 : TypographyElementBase
-
Declaration
Swift
public final class Hr : GenericElement
-
Declaration
Swift
public final class Img : GenericElement
-
Class define a input type checkbox
### Usage Example: ###
See moreCheckbox("confirmField", id: "confirmField")
Declaration
Swift
public final class Checkbox : InputElementBase
-
Class define a input type text
### Usage Example: ###
See moreInputText("value", id: "nameField", placeholder: "Name")
Declaration
Swift
public final class InputText : InputElementBase
-
This class define a option select element
See moreDeclaration
Swift
public final class Option : GenericElement
-
This class define a select element
### Usage Example: ###
See morelet select = Select([["0-13": "0-13"], ["14-17": "14-17"], ["18-23": "18-23"]], attr:("id", "ageRangeField"))
Declaration
Swift
public final class Select : GenericElement
-
This class define a submit element
### Usage Example: ###
See morelet inputSubmit = Submit("Send") inputSubmit.addAttribute(("class","button-primary"))
Declaration
Swift
public class Submit : InputElementBase
-
This class define a Textarea element
### Usage Example: ###
See moreTextarea(("placeholder", "Hi Mike …"), ("id", "commentField"))
Declaration
Swift
public final class Textarea : GenericElement
-
Label tag element class
### Usage Example: ###
See morelet labelComment = Label("Comment") labelComment.addAttribute(("for", "commentField"))
Declaration
Swift
public final class Label : TypographyElementBase
-
Class for list item
See moreDeclaration
Swift
public class LI : GenericElement
-
Class for Unordered list
### Usage Example: ###
See morelet ul = UL() ul.add("Unordered list item 1") ul.add("Unordered list item 2")
Declaration
Swift
public class UL : GenericElement
-
Main tag element class
### Usage Example: ###
See morelet main = Main(("class","wrapper")) main.add(Hr())
Declaration
Swift
public final class Main : ContainerElementBase
-
P tag element class
### Usage Example: ###
See morelet paragraph = P() paragraph.add("This is Typography Paragraph demo.")
Declaration
Swift
public final class P : TypographyElementBase
-
Pre tag element class
See moreDeclaration
Swift
public final class Pre : TypographyElementBase
-
Section tag element class
### Usage Example: ###
See morelet section = Section(("id","typography"), ("class","container")) section.add(H3("Typography"))
Declaration
Swift
public final class Section : ContainerElementBase
-
Declaration
Swift
public class Small : TypographyElementBase
-
Declaration
Swift
public final class Strong : TypographyElementBase
-
Tbody tag element class
See moreDeclaration
Swift
public final class TBody : TableRowBase
-
THead tag element class
See moreDeclaration
Swift
public final class THead : TableRowBase
-
Table html tag class element
### Usage Example: ###
See morelet table = Table() table.tableHeaders(titles: ["Name", "Age", "Height", "Location"]) //table.tableHeaders(titles: ["Name", "Age", "Height", "Location"], aligns: ["center", "left", "left", "left"]) // Align Headers table.addRow() table.addInRow("Arthurito Thompson") table.addInRow("52") table.addInRow("1,30") table.addInRow("Torresmo, RS") table.addRow() table.addInRow("Stephen Curry") table.addInRow("27") table.addInRow("1,91") table.addInRow("Akron, OH") table.addRow() table.addInRow("Klay Thompson") table.addInRow("25") table.addInRow("2,01") table.addInRow("Los Angeles, CA")
Declaration
Swift
public final class Table : GenericElement
-
Td tag element class
See moreDeclaration
Swift
public final class Td : ContainerElementBase
-
Th tag element class
See moreDeclaration
Swift
public final class Th : TableColumnBase
-
Tr tag element class
See moreDeclaration
Swift
public final class Tr : TableRowBase
-
Make a simple text Element to append in others elements
### Usage Example: ###
See moreText("Simple Text")
Declaration
Swift
public final class Text : ElementProtocol
-
Declaration
Swift
public final class U : TypographyElementBase