Create a styled text input using Designsystemet styles.
Usage
ds_input(
inputId,
value = "",
type = "text",
placeholder = NULL,
size = NULL,
readonly = FALSE,
disabled = FALSE,
invalid = FALSE,
...
)Arguments
- inputId
The input slot for Shiny reactivity
- value
Initial value
- type
Input type ("text", "email", "password", "number", "tel", "url")
- placeholder
Placeholder text
- size
Size variant ("sm", "md", "lg")
- readonly
If TRUE, makes the input read-only
- disabled
If TRUE, disables the input
- invalid
If TRUE, shows invalid state
- ...
Additional attributes
Examples
ds_input("name", placeholder = "Enter your name")
#> <input id="name" name="name" class="ds-input ds-shiny-input" type="text" value="" placeholder="Enter your name"/>
ds_input("email", type = "email", placeholder = "your@email.com")
#> <input id="email" name="email" class="ds-input ds-shiny-input" type="email" value="" placeholder="your@email.com"/>