input_number: Add a number input to a website

View source: R/input_number.R

input_numberR Documentation

Add a number input to a website

Description

Adds an direct number input element to a website.

Usage

input_number(label, id = label, ..., default = NULL, variable = NULL,
  min = NULL, max = NULL, step = NULL, type = "number", class = NULL,
  note = NULL, dataview = NULL, floating_label = TRUE, buttons = FALSE,
  show_range = FALSE)

Arguments

label

Label of the input for the user.

id

Unique ID of the element to be created.

...

Other attributes to add to the input.

default

Default value of the input, the ID of an input to use as the default, or "min" or "max" to default to the current minimum or maximum value.

variable

The name of a variable or ID of a variable selector to get a range from.

min

The smallest allowed value.

max

The largest allowed value.

step

Amount to increase or decrease the value by when changed with arrows.

type

Name of the input's type – other number-based types like date might make sense.

class

Class names to add to the input's list.

note

Text to display as a tooltip for the input.

dataview

ID of a input_dataview, to use as a source of variables.

floating_label

Logical; if FALSE, labels are separate from their input elements.

buttons

Logical; if TRUE, adds increment and decrement buttons to the sides of the input.

show_range

Logical; if TRUE, adds min and max indicators around the input field.

Value

A character vector of the contents to be added.

Examples

## Not run: 
input_text("entered_text", "Enter Text:")

## End(Not run)

uva-bi-sdad/community documentation built on Oct. 12, 2023, 1:18 p.m.