settings: Modify components of slick settings

View source: R/settings.R

settingsR Documentation

Modify components of slick settings

Description

Customize non-data components of the carousel.

Usage

settings(
  accessibility,
  adaptiveHeight,
  autoplay,
  autoplaySpeed,
  arrows,
  asNavFor,
  appendArrows,
  appendDots,
  prevArrow,
  nextArrow,
  centerMode,
  centerPadding,
  cssEase,
  customPaging,
  dots,
  dotsClass,
  draggable,
  fade,
  focusOnSelect,
  easing,
  edgeFriction,
  infinite,
  initialSlide,
  lazyLoad,
  mobileFirst,
  pauseOnFocus,
  pauseOnHover,
  pauseOnDotsHover,
  respondTo,
  responsive,
  rows,
  slide,
  slidesPerRow,
  slidesToShow,
  slidesToScroll,
  speed,
  swipe,
  swipeToSlide,
  touchMove,
  touchThreshold,
  useCSS,
  useTransform,
  variableWidth,
  vertical,
  verticalSwiping,
  rtl,
  waitForAnimate,
  zIndex,
  ...
)

Arguments

accessibility

logical, Enables tabbing and arrow key navigation, Default: TRUE

adaptiveHeight

logical, Enables adaptive height for single slide horizontal carousels., Default: FALSE

autoplay

logical, Enables Autoplay, Default: FALSE

autoplaySpeed

numeric, Autoplay Speed in milliseconds, Default: 3000

arrows

logical, Prev/Next Arrows, Default: TRUE

asNavFor

character, Set the slider to be the navigation of other slider (Class or ID Name), Default: null

appendArrows

character, Change where the navigation arrows are attached (Selector, htmlString, Array, Element, jQuery object), Default: $(element)

appendDots

character, Change where the navigation dots are attached (Selector, htmlString, Array, Element, jQuery object), Default: $(element)

prevArrow

character (html|jQuery selector) | object (DOM node|jQuery object), Allows you to select a node or customize the HTML for the "Previous" arrow., Default: <button type="button" class="slick-prev">Previous</button>

nextArrow

character (html|jQuery selector) | object (DOM node|jQuery object), Allows you to select a node or customize the HTML for the "Next" arrow., Default: <button type="button" class="slick-next">Next</button>

centerMode

logical, Enables centered view with partial prev/next slides. Use with odd numbered slidesToShow counts., Default: FALSE

centerPadding

character, Side padding when in center mode (px or \ Default: '50px'

cssEase

character, CSS3 Animation Easing, Default: 'ease'

customPaging

function, Custom paging templates. See source for use example., Default: n/a

dots

logical, Show dot indicators, Default: FALSE

dotsClass

character, Class for slide indicator dots container, Default: 'slick-dots'

draggable

logical, Enable mouse dragging, Default: TRUE

fade

logical, Enable fade, Default: FALSE

focusOnSelect

logical, Enable focus on selected element (click), Default: FALSE

easing

character, Add easing for jQuery animate. Use with easing libraries or default easing methods, Default: 'linear'

edgeFriction

numeric, Resistance when swiping edges of non-infinite carousels, Default: 0.15

infinite

logical, Infinite loop sliding, Default: TRUE

initialSlide

numeric, Slide to start on, Default: 0

lazyLoad

character, Set lazy loading technique. Accepts 'ondemand' or 'progressive', Default: 'ondemand'

mobileFirst

logical, Responsive settings use mobile first calculation, Default: FALSE

pauseOnFocus

logical, Pause Autoplay On Focus, Default: TRUE

pauseOnHover

logical, Pause Autoplay On Hover, Default: TRUE

pauseOnDotsHover

logical, Pause Autoplay when a dot is hovered, Default: FALSE

respondTo

character, Width that responsive object responds to. Can be 'window', 'slider' or 'min' (the smaller of the two), Default: 'window'

responsive

object, Object containing breakpoints and settings objects (see demo). Enables settings sets at given screen width. Set settings to "unslick" instead of an object to disable slick at a given breakpoint., Default: none

rows

numeric, Setting this to more than 1 initializes grid mode. Use slidesPerRow to set how many slides should be in each row., Default: 1

slide

element, Element query to use as slide, Default: ”

slidesPerRow

numeric, With grid mode intialized via the rows option, this sets how many slides are in each grid row. dver, Default: 1

slidesToShow

numeric, # of slides to show, Default: 1

slidesToScroll

numeric, # of slides to scroll, Default: 1

speed

numeric, Slide/Fade animation speed in milliseconds, Default: 300

swipe

logical, Enable swiping, Default: TRUE

swipeToSlide

logical, Allow users to drag or swipe directly to a slide irrespective of slidesToScroll, Default: FALSE

touchMove

logical, Enable slide motion with touch, Default: TRUE

touchThreshold

numeric, To advance slides, the user must swipe a length of (1/touchThreshold) * the width of the slider, Default: 5

useCSS

logical, Enable/Disable CSS Transitions, Default: TRUE

useTransform

logical, Enable/Disable CSS Transforms, Default: TRUE

variableWidth

logical, Variable width slides, Default: FALSE

vertical

logical, Vertical slide mode, Default: FALSE

verticalSwiping

logical, Vertical swipe mode, Default: FALSE

rtl

logical, Change the slider's direction to become right-to-left, Default: FALSE

waitForAnimate

logical, Ignores requests to advance the slide while animating, Default: TRUE

zIndex

numeric, Set the zIndex values for slides, useful for IE9 and lower, Default: 1000

...

unused

Details

To find further information on the attributes that can be used please refer to http://kenwheeler.github.io/slick/.

Value

list of class c('setting','slickR')

Examples


if(interactive()){

slick <- slickR(obj=nba_team_logo$uri)

slick

# Use settings function to manipulate the slick object
 
# Add dots
 
slick + settings(dots = TRUE)

# Autplay elements in the carousel
 
slick + settings(autoplay = TRUE, autoplaySpeed = 1000)

}


slickR documentation built on Dec. 28, 2022, 2:41 a.m.