Debian Codegraph @

man/themeSelector.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/shinytheme.R
3 \name{themeSelector}
4 \alias{themeSelector}
5 \title{Add a theme selector widget in a floating panel}
6 \usage{
7 themeSelector()
8 }
9 \description{
10 This adds a widget for selecting the theme, in a floating panel. It is meant
11 for use during the development phase of a Shiny application.
12 }
13 \details{
14 This can be inserted anywhere inside of the application, although if it is
15 put inside a tab, it will be visible only when that tab is showing. For it to
16 show at all times, it must be used outside a tab.
17 }
18 \examples{
19
20 if (interactive()) {
21 # themeSelector can be inserted anywhere in the app.
22 shinyApp(
23 ui = fluidPage(
24 shinythemes::themeSelector(),
25 sidebarPanel(
26 textInput("txt", "Text input:", "text here"),
27 sliderInput("slider", "Slider input:", 1, 100, 30),
28 actionButton("action", "Button"),
29 actionButton("action2", "Button2", class = "btn-primary")
30 ),
31 mainPanel(
32 tabsetPanel(
33 tabPanel("Tab 1"),
34 tabPanel("Tab 2")
35 )
36 )
37 ),
38 server = function(input, output) {}
39 )
40
41
42 # If this is used with a navbarPage() or other type of page where there is not a
43 # good place to put it where it is outside of all tabs, you can wrap the entire
44 # page in tagList() and make the themeSelector a sibling of the page.
45 shinyApp(
46 ui = tagList(
47 shinythemes::themeSelector(),
48 navbarPage(
49 "Theme test",
50 tabPanel("Navbar 1",
51 sidebarPanel(
52 textInput("txt", "Text input:", "text here"),
53 sliderInput("slider", "Slider input:", 1, 100, 30),
54 actionButton("action", "Button"),
55 actionButton("action2", "Button2", class = "btn-primary")
56 ),
57 mainPanel(
58 tabsetPanel(
59 tabPanel("Tab 1"),
60 tabPanel("Tab 2")
61 )
62 )
63 ),
64 tabPanel("Navbar 2")
65 )
66 ),
67 server = function(input, output) {}
68 )
69 }
70 }