% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glass-theme.R
\name{glass_theme_toggle}
\alias{glass_theme_toggle}
\title{Light / dark / auto theme toggle buttons}
\usage{
glass_theme_toggle(
  inputId = "glass_toggle",
  selected = c("auto", "light", "dark"),
  labels = c(light = "Light", dark = "Dark", auto = "Auto (OS)"),
  class = "glass-theme-toggle"
)
}
\arguments{
\item{inputId}{Base id. Buttons are \verb{\{inputId\}_light}, \verb{\{inputId\}_dark},
and \verb{\{inputId\}_auto}.}

\item{selected}{Initially highlighted mode (\code{"light"}, \code{"dark"}, or
\code{"auto"}). Cosmetic only; the page theme still comes from \code{\link[=glass_theme]{glass_theme()}}.}

\item{labels}{Named character vector for button labels. Names must be
\code{light}, \code{dark}, and/or \code{auto}.}

\item{class}{Extra CSS classes for the wrapper.}
}
\value{
An \code{\link[htmltools:tag]{htmltools::tag()}} button group.
}
\description{
Drop-in button group for switching the glass preset. Each button sets the
preset on the client immediately (\code{window.shinyglass.setPreset}) and also
has a 'shiny' input id so \code{\link[=observe_glass_theme_toggle]{observe_glass_theme_toggle()}} can keep the server
in sync (important on hosts that rewrite custom messages).
}
\seealso{
\code{\link[=observe_glass_theme_toggle]{observe_glass_theme_toggle()}}, \code{\link[=update_glass_theme]{update_glass_theme()}}
}
