selectors.Rd
Create selectors to select particular elements.
sel_id(value) sel_input(value) sel_all() sel_class(value) sel_tag(value) sel_attr(attribute, value = NULL, tag = NULL)
value | Value of selector. |
---|---|
attribute | Name of attribute. |
tag | Name of tag. |
The functions will print in the console the CSS selector they compose.
sel_id()
- Select an object by its id, e.g.: sel_id('btn')
selects shiny::actionButton('btn', 'Button')
.
sel_all()
- Selects everything.
sel_input()
- Selects an input by its id, e.g.: sel_id('txt')
selects shiny::textInput('txt', 'Text')
.
sel_class()
- Select all elements bearing a specific class, e.g.: sel_class('cls')
, selects shiny::h1('hello', class = 'cls')
.
sel_tag()
- Select all tags, e.g.: sel_tag('p')
selects p('hello')
.
sel_attr()
- Select all tags with a specific attribute.
%with%
, %or%
, and %child%
as well as
when_active()
, when_hover()
, and when_focus()
for more sophisticated element selection.
#>#> ℹ CSS selector: .container