Learn R Programming

shiny

Easily build rich and productive interactive web apps in R — no HTML/CSS/JavaScript required.

Features

  • An intuitive and extensible reactive programming model which makes it easy to transform existing R code into a "live app" where outputs automatically react to new user input.
    • Compared to event-based programming, reactivity allows Shiny to do the minimum amount of work when input(s) change, and allows humans to more easily reason about complex MVC logic.
  • A prebuilt set of highly sophisticated, customizable, and easy-to-use widgets (e.g., plots, tables, sliders, dropdowns, date pickers, and more).
  • An attractive default look based on Bootstrap which can also be easily customized with the bslib package or avoided entirely with more direct R bindings to HTML/CSS/JavaScript.
  • Seamless integration with R Markdown, making it easy to embed numerous applications natively within a larger dynamic document.
  • Tools for improving and monitoring performance, including native support for async programming, caching, load testing, and more.
  • Modules: a framework for reducing code duplication and complexity.
  • An ability to bookmark application state and/or generate code to reproduce output(s).
  • A rich ecosystem of extension packages for more custom widgets, input validation, unit testing, and more.

Installation

To install the stable version from CRAN:

install.packages("shiny")

Getting Started

Once installed, load the library and run an example:

library(shiny)
# Launches an app, with the app's source code included
runExample("06_tabsets")
# Lists more prepackaged examples
runExample()

For more examples and inspiration, check out the Shiny User Gallery.

For help with learning fundamental Shiny programming concepts, check out the Mastering Shiny book and the Shiny Tutorial. The former is currently more up-to-date with modern Shiny features, whereas the latter takes a deeper, more visual, dive into fundamental concepts.

Join the conversation

If you want to chat about Shiny, meet other developers, or help us decide what to work on next, join us on Discord.

Getting Help

To ask a question about Shiny, please use the RStudio Community website.

For bug reports, please use the issue tracker and also keep in mind that by writing a good bug report, you're more likely to get help with your problem.

Contributing

We welcome contributions to the shiny package. Please see our CONTRIBUTING.md file for detailed guidelines of how to contribute.

License

The shiny package as a whole is licensed under the GPLv3. See the LICENSE file for more details.

R version support

Shiny is supported on the latest release version of R, as well as the previous four minor release versions of R. For example, if the latest release R version is 4.3, then that version is supported, as well as 4.2, 4.1, 4.0, 3.6.

Copy Link

Version

Install

install.packages('shiny')

Monthly Downloads

602,099

Version

1.12.0

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Carson Sievert

Last Published

December 3rd, 2025

Functions in shiny (1.12.0)

clickOpts

Control interactive plot point events
checkboxGroupInput

Checkbox Group Input Control
bootstrapLib

Bootstrap libraries
callModule

Invoke a Shiny module
checkboxInput

Checkbox Input Control
busyIndicatorOptions

Customize busy indicator options
brushOpts

Create an object representing brushing options
brushedPoints

Find rows of data selected on an interactive plot.
bootstrapPage

Create a Bootstrap page
column

Create a column within a UI definition
createWebDependency

Create a web dependency
dateRangeInput

Create date range input
diskCache

Create disk cache (deprecated)
dateInput

Create date input
domains

Reactive domains
conditionalPanel

Conditional Panel
devmode

Shiny Developer Mode
debounce

Slow down a reactive expression with debounce/throttle
downloadButton

Create a download button or link
createRenderFunction

Implement custom render functions
downloadHandler

File Downloads
enableBookmarking

Enable bookmarking for a Shiny application
exportTestValues

Register expressions for export in test mode
fixedPage

Create a page with a fixed layout
fillRow

Flex Box-based row/column layouts
htmlOutput

Create an HTML output element
getCurrentTheme

Obtain Shiny's Bootstrap Sass theme
getQueryString

Get the query string / hash component from the URL
freezeReactiveVal

Freeze a reactive value
getCurrentOutputInfo

Get output information
insertUI

Insert and remove UI objects
httpResponse

Create an HTTP response object
insertTab

Dynamically insert/remove a tabPanel
fillPage

Create a page that fills the window
loadSupport

Load an app's supporting R files
fileInput

File Upload Control
makeReactiveBinding

Make a reactive variable
helpText

Create a help text element
is.reactivevalues

Checks whether an object is a reactivevalues object
invalidateLater

Scheduled Invalidation
fluidPage

Create a page with fluid layout
flowLayout

Flow layout
icon

Create an icon
headerPanel

Create a header panel
memoryCache

Create memory cache (deprecated)
exprToFunction

Convert an expression to a function
markdown

Insert inline Markdown
moduleServer

Shiny modules
inputPanel

Input panel
isolate

Create a non-reactive scope for an expression
knitr_methods

Knitr S3 methods
markOutputAttrs

Mark a render function with attributes that will be used by the output
maskReactiveContext

Evaluate an expression without a reactive context
onStop

Run code after an application or session ends
outputOptions

Set options for an output object.
observeEvent

Event handler
navbarPage

Create a page with a top level navigation bar
observe

Create a reactive observer
parseQueryString

Parse a GET query string from a URL
modalDialog

Create a modal dialog UI
pageWithSidebar

Create a page with a sidebar
onBookmark

Add callbacks for Shiny session bookmarking events
numericInput

Create a numeric input control
navlistPanel

Create a navigation list panel
reactiveConsole

Activate reactivity in the console
reactive

Create a reactive expression
onFlush

Add callbacks for Shiny session events
reactiveFileReader

Reactive file reader
reactivePoll

Reactive polling
reactiveTimer

Timer
reactiveVal

Create a (single) reactive value
markRenderFunction

Mark a function as a render function
renderPlot

Plot Output
renderPrint

Text Output
isRunning

Check whether a Shiny application is running
plotPNG

Capture a plot as a PNG file.
radioButtons

Create radio buttons
isTruthy

Truthy and falsy values
passwordInput

Create a password input control
plotOutput

Create an plot or image output element
registerThemeDependency

Register a theme dependency
registerInputHandler

Register an Input Handler
renderImage

Image file output
runApp

Run Shiny Application
runGadget

Run a gadget
reactiveValuesToList

Convert a reactivevalues object to a list
removeInputHandler

Deregister an Input Handler
dataTableOutput

Table output with the JavaScript DataTables library
runExample

Run Shiny Example Applications
renderCachedPlot

Plot output with cached images
reactiveValues

Create an object for storing reactive values
runTests

Runs the tests associated with this Shiny app
addResourcePath

Resource Publishing
renderUI

UI Output
tableOutput

Table Output
shiny-package

Web Application Framework for R
setSerializer

Add a function for serializing an input before bookmarking application state
repeatable

Make a random number generator repeatable
showBookmarkUrlModal

Display a modal dialog for bookmarking
req

Check for required values
reexports

Objects exported from other packages
safeError

Declare an error safe for the user to see
reactlog

Reactive Log Visualizer
shinyUI

Create a Shiny UI handler
runUrl

Run a Shiny application from a URL
getShinyOption

Get or set Shiny options
showNotification

Show or remove a notification
setBookmarkExclude

Exclude inputs from bookmarking
session

Session object
showModal

Show or remove a modal dialog
shinyApp

Create a Shiny app object
shiny.appobj

Shiny App object
shinyServer

Define Server Functionality
submitButton

Create a submit button
sidebarLayout

Layout a sidebar and main area
showTab

Dynamically hide/show a tabPanel
tabPanel

Create a tab panel
snapshotPreprocessOutput

Add a function for preprocessing an output before taking a test snapshot
selectInput

Create a select list input control
restoreInput

Restore an input value
updateActionButton

Change the label or icon of an action button on the client
updateCheckboxGroupInput

Change the value of a checkbox group input on the client
shinyAppTemplate

Generate a Shiny application from a template
stopApp

Stop the currently running Shiny app
serverInfo

Collect information about the Shiny Server environment
stacktrace

Stack trace manipulation functions
shinyDeprecated

Print message for deprecated functions in Shiny
updateDateInput

Change the value of a date input on the client
sizeGrowthRatio

Create a sizing function that grows at a given ratio
sliderInput

Slider Input Widget
updateCheckboxInput

Change the value of a checkbox input on the client
tabsetPanel

Create a tabset panel
titlePanel

Create a panel containing an application title.
updateTextAreaInput

Change the value of a textarea input on the client
updateTabsetPanel

Change the selected tab on the client
textOutput

Create a text output element
updateSelectInput

Change the value of a select input on the client
snapshotExclude

Mark an output to be excluded from test snapshots
snapshotPreprocessInput

Add a function for preprocessing an input before taking a test snapshot
splitLayout

Split layout
validate

Validate input values and other conditions
useBusyIndicators

Enable/disable busy indication
testServer

Reactive testing for Shiny server functions and modules
viewer

Viewer options
updateSliderInput

Update Slider Input Widget
wellPanel

Create a well panel
urlModal

Generate a modal dialog that displays a URL
varSelectInput

Select variables from a data frame
updateTextInput

Change the value of a text input on the client
verticalLayout

Lay out UI elements vertically
textInput

Create a text input control
textAreaInput

Create a textarea input control
updateRadioButtons

Change the value of a radio input on the client
updateQueryString

Update URL in browser's location bar
updateDateRangeInput

Change the start and end values of a date range input on the client
updateNumericInput

Change the value of a number input on the client
withMathJax

Load the MathJax library and typeset math expressions
withProgress

Reporting progress (functional API)