R/browse.R

Defines functions print.muiMaterial

Documented in print.muiMaterial

#' Print muiMaterial components
#'
#' When called interactively, renders the component in the IDE viewer panel.
#' Otherwise, falls back to standard shiny.tag printing (raw HTML text).
#'
#' @param x A muiMaterial object (also inherits shiny.tag).
#' @param browse Whether to render in viewer. Defaults to TRUE in interactive sessions.
#' @param ... Additional arguments passed to print.
#' @return Invisibly returns x.
#'
#' @export
print.muiMaterial <- function(x, browse = interactive(), ...) {
  if (browse) {
    htmltools::html_print(htmltools::browsable(x))
  } else {
    NextMethod("print")
  }
  invisible(x)
}

Try the muiMaterial package in your browser

Any scripts or data that you put into this service are public.

muiMaterial documentation built on March 15, 2026, 5:07 p.m.