% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glassSelect.R
\name{glassSelect}
\alias{glassSelect}
\title{Animated glass single-select dropdown}
\usage{
glassSelect(
  inputId,
  choices,
  selected = NULL,
  label = NULL,
  placeholder = "Select an option",
  searchable = TRUE,
  clearable = FALSE,
  include_all = FALSE,
  all_choice_label = "All categories",
  all_choice_value = "__all__",
  check_style = c("checkbox", "check-only", "filled"),
  theme = "dark"
)
}
\arguments{
\item{inputId}{Shiny input id.}

\item{choices}{Named or unnamed character vector of choices.}

\item{selected}{Initially selected value. Defaults to \code{NULL}.}

\item{label}{Optional field label shown above the widget.}

\item{placeholder}{Trigger label when nothing is selected.}

\item{searchable}{Logical. Show search input inside dropdown? Default
\code{TRUE}.}

\item{clearable}{Logical. Show clear control for removing the current
selection? Default \code{FALSE}.}

\item{include_all}{Logical. Prepend an explicit "All" option. Default
\code{FALSE}.}

\item{all_choice_label}{Label used for the explicit "All" option.}

\item{all_choice_value}{Value used for the explicit "All" option.}

\item{check_style}{One of \code{"checkbox"} (default),
\code{"check-only"}, or \code{"filled"}.}

\item{theme}{Color theme. One of \code{"dark"} (default) or \code{"light"},
or a \code{\link[=glass_select_theme]{glass_select_theme()}} object.}
}
\value{
An \code{htmltools::tagList} containing the single-select trigger,
dropdown panel, and scoped \code{<style>} block.
}
\description{
A stylized single-select Shiny input with optional search, clear control,
selection-marker styling, and programmatic updates via \code{\link[=updateGlassSelect]{updateGlassSelect()}}.
}
\details{
The widget registers one Shiny input:

\itemize{
\item \code{input$<inputId>} : selected value as a length-1 character string,
or \code{NULL} when nothing is selected
}
}
\examples{
fruits <- c(Apple = "apple", Banana = "banana", Cherry = "cherry")

glassSelect("fruit", fruits)

glassSelect(
  "fruit",
  fruits,
  selected = "banana",
  clearable = TRUE
)

glassSelect(
  "fruit",
  fruits,
  include_all = TRUE,
  all_choice_label = "All fruits",
  all_choice_value = "__all__"
)

glassSelect(
  "fruit",
  fruits,
  check_style = "filled"
)

}
