-
Notifications
You must be signed in to change notification settings - Fork 71
Open
Description
I am trying to understand how to create a custom tag for a component library. However the tag() function does not have an example. It is unclear what the structure of varArgs argument should be.
Lines 639 to 667 in 038ef7b
| #' tags$html( | |
| #' tags$head( | |
| #' tags$title('My first page') | |
| #' ), | |
| #' tags$body( | |
| #' h1('My first heading'), | |
| #' p('My first paragraph, with some ', strong('bold'), ' text.'), | |
| #' div( | |
| #' id = 'myDiv', class = 'simpleDiv', | |
| #' 'Here is a div with some attributes.' | |
| #' ) | |
| #' ) | |
| #' ) | |
| #' | |
| #' # html5 <audio> with boolean control attribute | |
| #' # https://www.w3.org/TR/html5/infrastructure.html#sec-boolean-attributes | |
| #' tags$audio( | |
| #' controls = NA, | |
| #' tags$source( | |
| #' src = "myfile.wav", | |
| #' type = "audio/wav" | |
| #' ) | |
| #' ) | |
| #' | |
| #' # suppress the whitespace between tags | |
| #' tags$span( | |
| #' tags$strong("I'm strong", .noWS="outside") | |
| #' ) | |
| #' |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels