navr: Responsive Toolbar htmlwidget

Description Usage Arguments

Description

Utility htmlwidget to provide a responsive toolbar to a htmltools::tag, HTML element, or another htmlwidget. The underlying JavaScript library is responsive-nav.js, which is lightweight and dependency-free.

Usage

1
2
navr(selector = "body", taglist = tagList(), options = NULL, width = 0,
  height = 0)

Arguments

selector

string CSS selector of html element in which to build the toolbar.

taglist

tagList or HTML of items for the toolbar. Generally, these will be tags$ul containing tags$li.

options

list of config options for responsive-nav.js. See Usage Instructions for a discussion. Options and their default values are listed below for reference.

  • animate: true // Boolean: Use CSS3 transitions, true or false

  • transition: 284 // Integer: Speed of the transition, in milliseconds

  • label: "Menu" // String: Label for the navigation toggle

  • insert: "before" // String: Insert the toggle before or after the navigation

  • customToggle: "" // Selector: Specify the ID of a custom toggle

  • closeOnNavClick: false // Boolean: Close the navigation when one of the links are clicked

  • openPos: "relative" // String: Position of the opened nav, relative or static

  • navClass: "nav-collapse" // String: Default CSS class. If changed, you need to edit the CSS too!

  • navActiveClass: "js-nav-active" // String: Class that is added to <html> element when nav is active

  • jsClass: "js" // String: 'JS enabled' class which is added to <html> element

  • init: function() // Function: Init callback

  • open: function() // Function: Open callback

  • close: function() // Function: Close callback

width

integer width of the container in pixels. Since this is generally expected to not be shown, 0 is the default. However, if provided, width and height will be respected.

height

integer height of the container in pixels. Since this is generally expected to not be shown, 0 is the default. However, if provided, width and height will be respected.


timelyportfolio/navr documentation built on May 31, 2019, 1:51 p.m.