Learn R Programming

shinyNextUI (version 0.1.0)

code_block: code

Description

Code is a component used to display inline code.

Usage

code_block(...)

Value

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

Arguments

...

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

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".

See Also

Examples

Run this code
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)

Run the code above in your browser using DataLab