bttn_options: Options for buttons displayed above calendar

Description Usage Arguments Value Note Examples

View source: R/bttn_options.R

Description

Options for buttons displayed above calendar

Usage

1
2
3
4
5
6
7
8
bttn_options(
  today_label = "Today",
  prev_label = htmltools::tags$i(class = "fa fa-chevron-left"),
  next_label = htmltools::tags$i(class = "fa fa-chevron-right"),
  class = "bttn-jelly bttn-sm bttn-primary",
  bg = NULL,
  color = NULL
)

Arguments

today_label

Text to display on today button.

prev_label

Text to display on prev button.

next_label

Text to display on next button.

class

Class to add to buttons.

bg

Background color.

color

Text color.

Value

a list.

Note

Buttons are generated with the following CSS library : http://bttn.surge.sh/, where you can find available options for class argument.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Use another button style
calendar(
  defaultView = "month", useNav = TRUE, 
  bttnOpts = bttn_options(
    class = "bttn-stretch bttn-sm bttn-warning"
  )
)

# Custom colors (background and text)
calendar(
  defaultView = "month", useNav = TRUE, 
  bttnOpts = bttn_options(bg = "#FE2E2E", color = "#FFF")
)

# both
calendar(
  defaultView = "month", useNav = TRUE, 
  bttnOpts = bttn_options(
    bg = "#04B431", color = "#FFF", 
    class = "bttn-float bttn-md"
  )
)

dreamRs/tuicalendr documentation built on Aug. 4, 2021, 12:02 a.m.