% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glass-intensity.R
\name{glass_intensity_slider}
\alias{glass_intensity_slider}
\title{Liquid Glass intensity slider (iOS 27-style)}
\usage{
glass_intensity_slider(
  inputId = "glass_intensity",
  label = "Liquid Glass",
  value = NULL,
  min = 0,
  max = 1,
  step = 0.01,
  min_label = "Ultra Clear",
  max_label = "Tinted",
  preview = TRUE,
  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{value}{Initial intensity in \eqn{[0, 1]}. If \code{NULL}, uses the theme
default from \code{\link[=glass_theme]{glass_theme()}} / the client current intensity.}

\item{min, max, step}{Range for the underlying range input. Defaults cover
the full Ultra Clear -> Tinted spectrum.}

\item{min_label, max_label}{End-cap captions (iOS uses "Ultra Clear" /
"Tinted").}

\item{preview}{Show three mini glass chips as a live material sample.}

\item{width}{CSS width (passed to \code{\link[shiny:validateCssUnit]{shiny::validateCssUnit()}}).}
}
\value{
A Shiny UI tag hierarchy.
}
\description{
UI control matching iOS 27 \strong{Settings -> Appearance -> Liquid Glass}: a
continuous slider from \strong{Ultra Clear} (\code{0}) to \strong{Tinted} (\code{1}) that
live-updates the glass material without a page reload.
}
\details{
The client applies changes immediately via \code{window.shinyglass.setIntensity()}.
The value is also a normal Shiny input (\code{input[[inputId]]}) so the server can
react or persist it. Pair with \code{\link[=glass_theme]{glass_theme()}} \verb{intensity=} for the starting
value, and optionally \code{\link[=observe_glass_intensity]{observe_glass_intensity()}} to push server-driven
updates through \code{\link[=update_glass_theme]{update_glass_theme()}}.
}
\examples{
if (interactive()) {
  library(shiny)
  library(shinyglass)

  ui <- fluidPage(
    theme = glass_theme(intensity = 0.35),
    glass_theme_toggle(),
    glass_intensity_slider("glass_intensity"),
    plotOutput("p")
  )

  server <- function(input, output, session) {
    observe_glass_theme_toggle(input, session)
    # optional: mirror slider -> server message (client already updates live)
    observe_glass_intensity(input, session, "glass_intensity")
    output$p <- renderPlot(plot(rnorm(100), rnorm(100), pch = 16, col = "#007AFF"))
  }

  shinyApp(ui, server)
}

}
