% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dt2_buttons.R
\name{dt2_buttons}
\alias{dt2_buttons}
\title{Configure DataTables Buttons and (optionally) move them to a custom container}
\usage{
dt2_buttons(
  options = list(),
  buttons = c("copyHtml5", "csvHtml5", "excelHtml5", "pdfHtml5", "print"),
  target = NULL
)
}
\arguments{
\item{options}{A DT2 \code{options} list you are building.}

\item{buttons}{Character vector with button names (e.g. \code{"copyHtml5"}, \code{"csvHtml5"}, \code{"excelHtml5"}, \code{"pdfHtml5"}, \code{"print"}).
You can also pass a list with full button objects.}

\item{target}{Optional CSS selector (e.g. \code{"#btn-slot"} or \code{".my-toolbar"}) to receive the
buttons container. If provided, DT2 will move the rendered buttons to that container after init.}
}
\value{
The modified \code{options} list.
}
\description{
Configure DataTables Buttons and (optionally) move them to a custom container
}
\details{
Requires the \strong{Buttons} extension. For CSV/Excel/PDF you also need \strong{JSZip} and \strong{pdfMake} (incl. \code{vfs_fonts}).

Prefer \code{\link[=dt2_use_buttons]{dt2_use_buttons()}} for the common case: it takes simple button ids,
styles them with a CSS class, and places them in the layout. Use
\code{dt2_buttons()} when you need full button objects or want to move the
rendered buttons into a custom container via \code{target}.
}
\seealso{
\code{\link[=dt2_use_buttons]{dt2_use_buttons()}}
}
