Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

absolutePanel

Panel with absolute positioning


Description

Creates a panel whose contents are absolutely positioned.

Usage

absolutePanel(
  ...,
  top = NULL,
  left = NULL,
  right = NULL,
  bottom = NULL,
  width = NULL,
  height = NULL,
  draggable = FALSE,
  fixed = FALSE,
  cursor = c("auto", "move", "default", "inherit")
)

fixedPanel(
  ...,
  top = NULL,
  left = NULL,
  right = NULL,
  bottom = NULL,
  width = NULL,
  height = NULL,
  draggable = FALSE,
  cursor = c("auto", "move", "default", "inherit")
)

Arguments

...

Attributes (named arguments) or children (unnamed arguments) that should be included in the panel.

top

Distance between the top of the panel, and the top of the page or parent container.

left

Distance between the left side of the panel, and the left of the page or parent container.

right

Distance between the right side of the panel, and the right of the page or parent container.

bottom

Distance between the bottom of the panel, and the bottom of the page or parent container.

width

Width of the panel.

height

Height of the panel.

draggable

If TRUE, allows the user to move the panel by clicking and dragging.

fixed

Positions the panel relative to the browser window and prevents it from being scrolled with the rest of the page.

cursor

The type of cursor that should appear when the user mouses over the panel. Use "move" for a north-east-south-west icon, "default" for the usual cursor arrow, or "inherit" for the usual cursor behavior (including changing to an I-beam when the cursor is over text). The default is "auto", which is equivalent to ifelse(draggable, "move", "inherit").

Details

The absolutePanel function creates a <div> tag whose CSS position is set to absolute (or fixed if fixed = TRUE). The way absolute positioning works in HTML is that absolute coordinates are specified relative to its nearest parent element whose position is not set to static (which is the default), and if no such parent is found, then relative to the page borders. If you're not sure what that means, just keep in mind that you may get strange results if you use absolutePanel from inside of certain types of panels.

The fixedPanel function is the same as absolutePanel with fixed = TRUE.

The position (top, left, right, bottom) and size (width, height) parameters are all optional, but you should specify exactly two of top, bottom, and height and exactly two of left, right, and width for predictable results.

Like most other distance parameters in Shiny, the position and size parameters take a number (interpreted as pixels) or a valid CSS size string, such as "100px" (100 pixels) or "25%".

For arcane HTML reasons, to have the panel fill the page or parent you should specify 0 for top, left, right, and bottom rather than the more obvious width = "100%" and height = "100%".

Value

An HTML element or list of elements.


shiny

Web Application Framework for R

v1.6.0
GPL-3 | file LICENSE
Authors
Winston Chang [aut, cre], Joe Cheng [aut], JJ Allaire [aut], Carson Sievert [aut], Barret Schloerke [aut], Yihui Xie [aut], Jeff Allen [aut], Jonathan McPherson [aut], Alan Dipert [aut], Barbara Borges [aut], RStudio [cph], jQuery Foundation [cph] (jQuery library and jQuery UI library), jQuery contributors [ctb, cph] (jQuery library; authors listed in inst/www/shared/jquery-AUTHORS.txt), jQuery UI contributors [ctb, cph] (jQuery UI library; authors listed in inst/www/shared/jqueryui/AUTHORS.txt), Mark Otto [ctb] (Bootstrap library), Jacob Thornton [ctb] (Bootstrap library), Bootstrap contributors [ctb] (Bootstrap library), Twitter, Inc [cph] (Bootstrap library), Prem Nawaz Khan [ctb] (Bootstrap accessibility plugin), Victor Tsaran [ctb] (Bootstrap accessibility plugin), Dennis Lembree [ctb] (Bootstrap accessibility plugin), Srinivasu Chakravarthula [ctb] (Bootstrap accessibility plugin), Cathy O'Connor [ctb] (Bootstrap accessibility plugin), PayPal, Inc [cph] (Bootstrap accessibility plugin), Stefan Petre [ctb, cph] (Bootstrap-datepicker library), Andrew Rowls [ctb, cph] (Bootstrap-datepicker library), Dave Gandy [ctb, cph] (Font-Awesome font), Brian Reavis [ctb, cph] (selectize.js library), Salmen Bejaoui [ctb, cph] (selectize-plugin-a11y library), Denis Ineshin [ctb, cph] (ion.rangeSlider library), Sami Samhuri [ctb, cph] (Javascript strftime library), SpryMedia Limited [ctb, cph] (DataTables library), John Fraser [ctb, cph] (showdown.js library), John Gruber [ctb, cph] (showdown.js library), Ivan Sagalaev [ctb, cph] (highlight.js library), R Core Team [ctb, cph] (tar implementation from R)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.