form: Create Semantic UI form tag

Description Usage Arguments Examples

View source: R/dsl.R

Description

This creates a form tag using Semantic UI styles.

Usage

1
form(..., class = "")

Arguments

...

Other arguments to be added as attributes of the tag (e.g. style, class or childrens etc.)

class

Additional classes to add to html tag.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
## Only run examples in interactive R sessions
if (interactive()){
  library(shiny)
  library(shiny.semantic)

  ui <- shinyUI(semanticPage(
    form(
      field(
        tags$label("Text"),
        text_input("text_ex", value = "", type = "text", placeholder = "Enter Text...")
      )
    ),
    # loading form
    form(class = "loading form",
         field(
           tags$label("Text"),
           text_input("text_ex", value = "", type = "text", placeholder = "Enter Text...")
         )),
    # size variations mini form
    form(class = "mini",
         field(
           tags$label("Text"),
           text_input("text_ex", value = "", type = "text", placeholder = "Enter Text...")
         )),
    # massive
    form(class = "massive",
         field(
           tags$label("Text"),
           text_input("text_ex", value = "", type = "text", placeholder = "Enter Text...")
         ))
  ))
  server <- shinyServer(function(input, output) {
  })

  shinyApp(ui, server)
}

shiny.semantic documentation built on Nov. 7, 2021, 5:07 p.m.