% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glass_tabs.R
\name{glassTabsServer}
\alias{glassTabsServer}
\title{Server logic for glass tabs}
\usage{
glassTabsServer(id)
}
\arguments{
\item{id}{Module id matching the \code{id} passed to \code{\link[=glassTabsUI]{glassTabsUI()}}.}
}
\value{
A reactive expression returning the active tab value.
}
\description{
Tracks the active tab and exposes it as a reactive value.
}
\examples{
if (interactive()) {
  library(shiny)
  ui <- fluidPage(
    useGlassTabs(),
    glassTabsUI(
      "tabs",
      glassTabPanel("a", "A", p("Tab A"), selected = TRUE),
      glassTabPanel("b", "B", p("Tab B"))
    )
  )
  server <- function(input, output, session) {
    active <- glassTabsServer("tabs")
    observe(print(active()))
  }
  shinyApp(ui, server)
}
}
