-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from Appsilon/showcase
Showcase
- Loading branch information
Showing
71 changed files
with
1,125 additions
and
551 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,4 +23,5 @@ Suggests: | |
purrr, | ||
rcmdcheck, | ||
rmarkdown, | ||
shiny | ||
shiny, | ||
shiny.router |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,18 @@ | ||
library(shiny) | ||
library(appsilon.blueprint) | ||
library(shiny) | ||
|
||
items <- list( | ||
list(icon = "folder-close", text = "Users"), | ||
list(icon = "folder-close", text = "Janet"), | ||
list(icon = "document", text = "image.jpg") | ||
) | ||
|
||
if (interactive()) shinyApp( | ||
ui = Breadcrumbs(items = items), | ||
server = function(input, output) {} | ||
) | ||
ui <- function(id) { | ||
Breadcrumbs(items = items) | ||
} | ||
|
||
server <- function(id) { | ||
moduleServer(id, function(input, output, session) {}) | ||
} | ||
|
||
if (interactive()) shinyApp(ui("app"), function(input, output) server("app")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,42 @@ | ||
library(shiny) | ||
library(appsilon.blueprint) | ||
library(shiny) | ||
|
||
if (interactive()) shinyApp( | ||
ui = tagList( | ||
textOutput("clicks"), | ||
ui <- function(id) { | ||
ns <- NS(id) | ||
tagList( | ||
textOutput(ns("clicks")), | ||
Button( | ||
onClick = triggerEvent("click1"), | ||
onClick = triggerEvent(ns("click1")), | ||
icon = "refresh", | ||
"Refresh" | ||
), | ||
Button.shinyInput( | ||
inputId = "click2", | ||
inputId = ns("click2"), | ||
rightIcon = "share", | ||
"Export" | ||
), | ||
AnchorButton( | ||
onClick = triggerEvent("click3"), | ||
onClick = triggerEvent(ns("click3")), | ||
intent = "primary", | ||
"OK" | ||
), | ||
AnchorButton.shinyInput( | ||
inputId = "click4", | ||
inputId = ns("click4"), | ||
intent = "success", | ||
"Next" | ||
) | ||
), | ||
server = function(input, output) { | ||
) | ||
} | ||
|
||
server <- function(id) { | ||
moduleServer(id, function(input, output, session) { | ||
clicks <- reactiveVal(0) | ||
output$clicks <- renderText(paste("Clicks:", clicks())) | ||
observeEvent(input$click1, clicks(clicks() + 1)) | ||
observeEvent(input$click2, clicks(clicks() + 1)) | ||
observeEvent(input$click3, clicks(clicks() + 1)) | ||
observeEvent(input$click4, clicks(clicks() + 1)) | ||
} | ||
) | ||
}) | ||
} | ||
|
||
if (interactive()) shinyApp(ui("app"), function(input, output) server("app")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
library(shiny) | ||
library(appsilon.blueprint) | ||
library(shiny) | ||
|
||
if (interactive()) shinyApp( | ||
ui = ButtonGroup( | ||
ui <- function(id) { | ||
ButtonGroup( | ||
Button(icon = "database", "Queries"), | ||
Button(icon = "function", "Functions"), | ||
AnchorButton(rightIcon = "caret-down", "Options") | ||
), | ||
server = function(input, output) {} | ||
) | ||
) | ||
} | ||
|
||
server <- function(id) { | ||
moduleServer(id, function(input, output, session) {}) | ||
} | ||
|
||
if (interactive()) shinyApp(ui("app"), function(input, output) server("app")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
library(shiny) | ||
library(appsilon.blueprint) | ||
library(shiny) | ||
|
||
if (interactive()) shinyApp( | ||
ui = Callout( | ||
ui <- function(id) { | ||
Callout( | ||
title = "Visually important content", | ||
"The component is a simple wrapper around the CSS API", | ||
" that provides props for modifiers and optional title element.", | ||
" Any additional HTML props will be spread to the rendered ", Code("div"), " element." | ||
), | ||
server = function(input, output) {} | ||
) | ||
) | ||
} | ||
|
||
server <- function(id) { | ||
moduleServer(id, function(input, output, session) {}) | ||
} | ||
|
||
if (interactive()) shinyApp(ui("app"), function(input, output) server("app")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,20 @@ | ||
library(shiny) | ||
library(appsilon.blueprint) | ||
library(shiny) | ||
|
||
if (interactive()) shinyApp( | ||
ui = Card( | ||
ui <- function(id) { | ||
Card( | ||
interactive = TRUE, | ||
H5(tags$a(href = "#", "Analytical applications")), | ||
tags$p( | ||
"User interfaces that enable people to interact smoothly with data,", | ||
" ask better questions, and make better decisions." | ||
), | ||
Button(text = "Explore products") | ||
), | ||
server = function(input, output) {} | ||
) | ||
) | ||
} | ||
|
||
server <- function(id) { | ||
moduleServer(id, function(input, output, session) {}) | ||
} | ||
|
||
if (interactive()) shinyApp(ui("app"), function(input, output) server("app")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,33 @@ | ||
library(shiny) | ||
library(appsilon.blueprint) | ||
library(shiny) | ||
|
||
setInput <- function(inputId, accessor = NULL) { | ||
JS(paste0("x => Shiny.setInputValue('", inputId, "', x", accessor, ")")) | ||
} | ||
|
||
if (interactive()) shinyApp( | ||
ui = tagList( | ||
ui <- function(id) { | ||
ns <- NS(id) | ||
tagList( | ||
Checkbox( | ||
onChange = JS("(event) => Shiny.setInputValue('apples', event.target.checked)"), | ||
onChange = setInput(ns("apples"), ".target.checked"), | ||
defaultChecked = TRUE, | ||
label = "Apples" | ||
), | ||
Checkbox.shinyInput( | ||
inputId = "bananas", | ||
inputId = ns("bananas"), | ||
value = TRUE, | ||
label = "Bananas" | ||
), | ||
textOutput("applesEnabled"), | ||
textOutput("bananasEnabled") | ||
), | ||
server = function(input, output) { | ||
textOutput(ns("applesEnabled")), | ||
textOutput(ns("bananasEnabled")) | ||
) | ||
} | ||
|
||
server <- function(id) { | ||
moduleServer(id, function(input, output, session) { | ||
output$applesEnabled <- renderText(paste("Apples:", deparse(input$apples))) | ||
output$bananasEnabled <- renderText(paste("Bananas:", deparse(input$bananas))) | ||
} | ||
) | ||
}) | ||
} | ||
|
||
if (interactive()) shinyApp(ui("app"), function(input, output) server("app")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,16 @@ | ||
library(shiny) | ||
library(appsilon.blueprint) | ||
library(shiny) | ||
|
||
if (interactive()) shinyApp( | ||
ui = ControlGroup( | ||
ui <- function(id) { | ||
ControlGroup( | ||
HTMLSelect(options = rownames(mtcars)), | ||
InputGroup(placeholder = "Find car..."), | ||
Button(icon = "arrow-right"), | ||
), | ||
server = function(input, output) {} | ||
) | ||
) | ||
} | ||
|
||
server <- function(id) { | ||
moduleServer(id, function(input, output, session) {}) | ||
} | ||
|
||
if (interactive()) shinyApp(ui("app"), function(input, output) server("app")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
library(shiny) | ||
library(appsilon.blueprint) | ||
library(shiny) | ||
|
||
if (interactive()) shinyApp( | ||
ui = tagList( | ||
H2(EditableText(onChange = setInput("header"))), | ||
ui <- function(id) { | ||
ns <- NS(id) | ||
tagList( | ||
H2(EditableText(onChange = setInput(ns("header")))), | ||
EditableText.shinyInput( | ||
inputId = "body", | ||
inputId = ns("body"), | ||
multiline = TRUE, | ||
minLines = 3, maxLines = 12 | ||
), | ||
textOutput("headerValue"), | ||
textOutput("bodyValue") | ||
), | ||
server = function(input, output) { | ||
textOutput(ns("headerValue")), | ||
textOutput(ns("bodyValue")) | ||
) | ||
} | ||
|
||
server <- function(id) { | ||
moduleServer(id, function(input, output, session) { | ||
output$headerValue <- renderText(paste("Header:", deparse(input$header))) | ||
output$bodyValue <- renderText(paste("Body:", deparse(input$body))) | ||
} | ||
) | ||
}) | ||
} | ||
|
||
if (interactive()) shinyApp(ui("app"), function(input, output) server("app")) |
Oops, something went wrong.