% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glass-theme.R
\name{glass_preset_input}
\alias{glass_preset_input}
\title{Light / dark / auto preset select input}
\usage{
glass_preset_input(
  inputId = "glass_preset",
  label = "Theme preset",
  selected = c("auto", "light", "dark"),
  choices = c(Light = "light", Dark = "dark", `Auto (OS)` = "auto"),
  width = NULL
)
}
\arguments{
\item{inputId}{The \code{input} slot that will be used to access the value.}

\item{label}{Display label for the control (or \code{NULL} for none).}

\item{selected}{Initially selected mode (\code{"light"}, \code{"dark"}, or \code{"auto"}).}

\item{choices}{Named character vector of choices. Defaults to Light / Dark /
Auto (OS). Names are labels; values must be \code{light}, \code{dark}, and/or \code{auto}.}

\item{width}{The width of the input (e.g. \code{"100\%"}).}
}
\value{
A \code{\link[shiny:selectInput]{shiny::selectInput()}} tag (with glass client bindings).
}
\description{
Drop-in \code{\link[shiny:selectInput]{shiny::selectInput()}} for the glass theme preset. The client applies
the change \strong{immediately} via \code{window.shinyglass.setPreset()} (marked with
\code{data-glass-preset-input}), so Light/Dark/Auto works even when custom
messages are delayed or rewritten (e.g. on some shinyapps.io hosts). Pair
with \code{\link[=observe_glass_preset_input]{observe_glass_preset_input()}} so the server stays in sync.
}
\seealso{
\code{\link[=observe_glass_preset_input]{observe_glass_preset_input()}}, \code{\link[=glass_theme_toggle]{glass_theme_toggle()}},
\code{\link[=update_glass_theme]{update_glass_theme()}}
}
