snippet {shinyNextUI}R Documentation

snippet

Description

Snippet is a component that can be used to display inline or multiline code snippets.

Usage

snippet(...)

Arguments

...

Props to pass to the component. The allowed props are listed below in the Details section.

Details

Value

An object of class shiny.tag containing the necessary configuration and including options such as JavaScript dependencies to instantiate a HeroUI snippet component.

See Also

See https://heroui.com/docs/components/snippet.

Examples

library(shiny)
library(shinyNextUI)
library(shiny.react)

ui <- nextui_page(
  debug_react = TRUE,
  snippet("npm install @nextui-org/react", variant = "bordered"),
  spacer(y = 2),
  snippet("you can't copy me", hideCopyButton = TRUE),
  spacer(y = 2),
  snippet(
    color = "secondary",
    variant = "flat",
    span("npm install @nextui-org/react"),
    span("yarn add @nextui-org/react")
  )
)

server <- function(input, output, session) {

}

if (interactive() || is_testing()) shinyApp(ui, server)

[Package shinyNextUI version 0.1.0 Index]