Skip to contents

Code is a component used to display inline code.

Usage

code_block(...)

Arguments

...

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

Value

Object with shiny.tag class suitable for use in the UI of a Shiny app.

Details

  • children. Type: ReactNode. Default: NA.

  • size. Type: sm OR md OR lg. Default: "sm".

  • color. Type: default OR primary OR secondary OR success OR warning OR danger. Default: "default".

  • radius. Type: none OR sm OR md OR lg OR full. Default: "sm".

Examples

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

ui <- nextui_page(
  div(
    class = "flex gap-2 my-2",
    code_block(
      size = "lg",
      color = "secondary",
      radius = "full",
      "npm install @nextui-org/react"
    )
  )
)

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

}

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