Themes for Shiny

Themes for use with Shiny. Includes several Bootstrap themes from < https://bootswatch.com/>, which are packaged for use with Shiny applications.


shinythemes

NOTE: This package has been superseded by the {bslib} package, which provides Bootswatch (and as well as custom) themes for both Bootstrap 3 and 4.

See the documentation at https://rstudio.github.io/shinythemes/.

The shinythemes package provides some Bootstrap themes for use with Shiny. The themes are from from https://bootswatch.com/:

Using themes

Using the themes is simple. Use the theme argument to bootstrapPage, fluidPage, navbarPage, or fixedPage. The value should be shinytheme("<theme>"); for example, shinytheme("cerulean").

For example, a single-file app might look like this:

shinyApp(
  ui = navbarPage("United",
    theme = shinythemes::shinytheme("united"),  # <--- Specify theme here
    tabPanel("Plot", "Plot tab contents..."),
    navbarMenu("More",
      tabPanel("Summary", "Summary tab contents..."),
      tabPanel("Table", "Table tab contents...")
    )
  ),
  server = function(input, output) { }
)

Live theme selector

If you want to quickly test out different themes with an application, you can simply add themeSelector() somewhere to the UI. This will add a select box which lets you choose the theme. It will change the theme without having to reload or restart your app. You can see the theme selector in action here.

The theme selector is only meant to be used while developing an application. Once you've decided on which theme to use, pass it to the theme argument as described earlier.

Here's an example app with the theme selector:

shinyApp(
  ui = fluidPage(
    shinythemes::themeSelector(),  # <--- Add this somewhere in the UI
    sidebarPanel(
      textInput("txt", "Text input:", "text here"),
      sliderInput("slider", "Slider input:", 1, 100, 30),
      actionButton("action", "Button"),
      actionButton("action2", "Button2", class = "btn-primary")
    ),
    mainPanel(
      tabsetPanel(
        tabPanel("Tab 1"),
        tabPanel("Tab 2")
      )
    )
  ),
  server = function(input, output) {}
)

Once you've found a theme that you like, use it in the page as shown above, with theme = shinythemes::shinytheme(<theme here>).

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("shinythemes")

1.2.0 by Winston Chang, 6 years ago


https://rstudio.github.io/shinythemes/


Browse source code at https://github.com/cran/shinythemes


Authors: Winston Chang [aut, cre] , RStudio [cph] , Thomas Park [ctb, cph] (Bootswatch themes) , Lukasz Dziedzic [ctb, cph] (Lato font) , Nathan Willis [ctb, cph] (News Cycle font) , Google Corporation [ctb, cph] (Open Sans and Roboto fonts) , Matt McInerney [ctb, cph] (Raleway font) , Adobe Systems Incorporated [ctb, cph] (Source Sans Pro font) , Canonical Ltd [ctb, cph] (Ubuntu font)


Documentation:   PDF Manual  


GPL-3 | file LICENSE license


Imports shiny


Imported by APIS, AbSolution, AdverseEvents, BlockmodelingGUI, BsplineQuantRegGui, Eagle, EpiSimR, FielDHub, GFD, GFDrmst, GFDrmtl, GFDsurv, GenoTriplo, Isinglandr, LFApp, MetSizeR, MuPETFlow, NiLeDAM, OlympicRshiny, OpenRepGrid.ic, PKconverter, ParCC, ProjectionBasedClustering, RSP, SEAHORS, SPARTAAS, SampleSizeCalculator, StepRegShiny, SurprisalAnalysis, ViewR, abstractr, appRiori, archeoViz, archeofrag.gui, bayMDS, bayesMRM, bestSDP, bnRep, bootwar, censuspyrID, centrifugeR, cheem, clusterWebApp, cocktailApp, dartR.sim, dlmtree, epicmodel, exactamente, funresMech, gestate, gridsampler, heiscore, holi, html2R, icertool, kindisperse, mmiCATs, mmibain, mmirestriktor, monographaR, npboottprm, pandemonium, phase, precisely, protoshiny, qqvases, quadVAR, rcbayes, scdtb, shinyCLT, shinyNORRRM, shinystan, spANOVA, spatialCatalogueViewer, tteICE, wppExplorer.

Depended on by kgc, multichull, neodistr, sdcHierarchies, stmgui.

Suggested by AmpGram, CNVScope, CancerGram, Clustering, ImportExport, LipidMS, One4All, PROsetta, PiC, QurvE, RDML, RDML7, ShinyWizard, TestDesign, amapro, arulesViz, bayesmove, causalplot, cmsaf, compareGroups, countfitteR, dartR, dartR.base, dpcR, effectcheck, ideanet, immunarch, influential, lime, mirtCAT, mispitools, pdfcombiner, polmineR, rco, scDiffCom, shinyMergely, shinyMonacoEditor, shinyPredict, simRestore, skpr, tipsae, zscorer.


See at CRAN