bulmaSliderInput: Slider

View source: R/bulma-input.R

bulmaSliderInputR Documentation

Slider

Description

Add a slider input.

Usage

bulmaSliderInput(
  inputId,
  value,
  min,
  max,
  color = NULL,
  step = 1,
  class = NULL,
  size = NULL,
  orient = "horizontal",
  ...
)

Arguments

inputId

Id to access value.

value, min, max

Current value, maximum and minimum of slider.

color

Slider color.

step

Slider step.

class

Additional class.

size

Size of slider, see details.

orient

Slider orientation, takes, horizontal or vertical.

...

Any other parameter to pass to input.

Details

Valid size:

  • NULL (standard)

  • small

  • medium

  • large

Author(s)

John Coene, jcoenep@gmail.com

Examples

if(interactive()){
  library(shiny)
  
  ui <- bulmaPage(
    bulmaContainer(
      br(),
      bulmaSliderInput("slider", 10, 3, 150),
      plotOutput("plot")
    )
  )
  
  server <- function(input, output){
    data <- reactive({
      rnorm(input$slider, 20, 4)
    })
    
    output$plot <- renderPlot({
      hist(data())
    })
  }
  
  shinyApp(ui, server)
}

JohnCoene/shinybulma documentation built on Nov. 16, 2022, 6:42 p.m.