% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dt2.R
\name{dt2_theme}
\alias{dt2_theme}
\title{Create a reusable DT2 theme}
\usage{
dt2_theme(
  preset = "default",
  striped = NULL,
  hover = NULL,
  compact = NULL,
  font_scale = NULL,
  style = NULL,
  button_class = NULL
)
}
\arguments{
\item{preset}{A named preset to start from: \code{"default"}, \code{"clean"},
\code{"minimal"}, or \code{"compact"}. Remaining arguments override the preset.}

\item{striped}{Logical; alternate row colours.}

\item{hover}{Logical; highlight rows on hover.}

\item{compact}{Logical; reduce cell padding.}

\item{font_scale}{Numeric; font-size multiplier (e.g., 0.85 = 85\%).}

\item{style}{Styling framework: \code{"bootstrap5"} (default) or \code{"core"}
(plain DataTables).}

\item{button_class}{CSS class string for Buttons extension buttons.
Default: \code{"btn btn-sm btn-outline-secondary"}. See Bootstrap 5
button classes for options (e.g., \code{"btn btn-sm btn-primary"}).}
}
\value{
A \code{dt2_theme} object (a named list).
}
\description{
Creates a theme object that can be passed to \code{\link[=dt2]{dt2()}} via the \code{theme}
parameter. Useful when you want the same look across many tables.

For quick one-off styling, you can also pass arguments directly to
\code{\link[=dt2]{dt2()}} (e.g., \code{dt2(iris, striped = FALSE)}).
}
\examples{
# Create and reuse
my_theme <- dt2_theme("clean", compact = TRUE)
\donttest{
dt2(iris, theme = my_theme)
dt2(mtcars, theme = my_theme)
}

# Custom button style
dt2_theme("default", button_class = "btn btn-sm btn-primary")

# Presets
dt2_theme("minimal")
dt2_theme("compact")
}
