Intro

corazon

corazon allows you to incorporate easily colorffy gradient colors within Shiny elements.

Installation

You can install the development version of corazon from Github with:


install.packages("remotes")  # If not installed 

remotes::install_github("feddelegrand7/corazon")

Examples

By default corazon applies the color gradient on the body of your shiny app:

library(shiny)
library(corazon)

ui <- fluidPage(

corazon_gradient(colorName = "PINEAPPLE", txtColor = "#1ED760"),

h1("This is a Title"),

)

server <- function(input, output) {}

shinyApp(ui = ui, server = server)

How do you find the gradient colors’ names ?

You can incorporate gradients within any shiny element. You just need to prefix the shiny element’s Id with a #

library(shiny)
library(corazon)

ui <- fluidPage(

corazon_gradient(element = "#txt", colorName = "PEACH", txtColor = "#4E5C68"), # don't forget to prefix the id wih the # 

h1("This is a Title"),

textAreaInput(inputId = "txt", label = "This is textAreaInput ", height = "500px", width = "500px")


)

server <- function(input, output) {}

shinyApp(ui = ui, server = server)

Finally, you can apply different gradients to different shiny elements:

library(shiny)
library(corazon)

ui <- fluidPage(

corazon_gradient(colorName = "COOL", txtColor = "white"),  
corazon_gradient(element = "#txt", colorName = "SANGRIA WINE", txtColor = "#4E5C68"),  

h1("This is a Title"),

textAreaInput(inputId = "txt", label = "This is textAreaInput ", height = "500px", width = "500px")


)

server <- function(input, output) {}

shinyApp(ui = ui, server = server)