Wraps an R object in slickR compatible DOM
slick_div(
x,
css = htmltools::css(marginLeft = "auto", marginRight = "auto"),
type = "img",
links = NULL
)
object
css object, Default: htmltools::css(marginLeft='auto',marginRight='auto')
character, type of DOM, Default: 'img'
character, links to use on the input object, Default: NULL
list of shiny tag objects
Method converts xml_document, htmlwidget, character, or list of objects to a compatible DOM
Other html:
slick_list()
# image
slick_div(nba_team_logo$uri[1])
#> [[1]]
#> <img src="https://a.espncdn.com/combiner/i?img=/i/teamlogos/nba/500/atl.png&h=512&w=512" style="margin-left:auto;margin-right:auto;"/>
#>
# vector of images
slick_div(nba_team_logo$uri[c(1:5)])
#> [[1]]
#> <img src="https://a.espncdn.com/combiner/i?img=/i/teamlogos/nba/500/atl.png&h=512&w=512" style="margin-left:auto;margin-right:auto;"/>
#>
#> [[2]]
#> <img src="https://a.espncdn.com/combiner/i?img=/i/teamlogos/nba/500/bos.png&h=512&w=512" style="margin-left:auto;margin-right:auto;"/>
#>
#> [[3]]
#> <img src="https://a.espncdn.com/combiner/i?img=/i/teamlogos/nba/500/bkn.png&h=512&w=512" style="margin-left:auto;margin-right:auto;"/>
#>
#> [[4]]
#> <img src="https://a.espncdn.com/combiner/i?img=/i/teamlogos/nba/500/cha.png&h=512&w=512" style="margin-left:auto;margin-right:auto;"/>
#>
#> [[5]]
#> <img src="https://a.espncdn.com/combiner/i?img=/i/teamlogos/nba/500/chi.png&h=512&w=512" style="margin-left:auto;margin-right:auto;"/>
#>
# text
slick_div('abc',type = 'p')
#> [[1]]
#> <p style="margin-left:auto;margin-right:auto;">abc</p>
#>