Wraps an R object in slickR compatible DOM

slick_div(
  x,
  css = htmltools::css(marginLeft = "auto", marginRight = "auto"),
  type = "img",
  links = NULL
)

Arguments

x

object

css

css object, Default: htmltools::css(marginLeft='auto',marginRight='auto')

type

character, type of DOM, Default: 'img'

links

character, links to use on the input object, Default: NULL

Value

list of shiny tag objects

Details

Method converts xml_document, htmlwidget, character, or list of objects to a compatible DOM

See also

Other html: slick_list()

Examples

# image slick_div(nba_team_logo$uri[1])
#> [[1]] #> <img src="https://i.cdn.turner.com/nba/nba/.element/img/4.0/global/logos/512x512/bg.white/svg/ATL.svg" style="margin-left:auto;margin-right:auto;"/> #>
# vector of images slick_div(nba_team_logo$uri[c(1:5)])
#> [[1]] #> <img src="https://i.cdn.turner.com/nba/nba/.element/img/4.0/global/logos/512x512/bg.white/svg/ATL.svg" style="margin-left:auto;margin-right:auto;"/> #> #> [[2]] #> <img src="https://i.cdn.turner.com/nba/nba/.element/img/4.0/global/logos/512x512/bg.white/svg/BOS.svg" style="margin-left:auto;margin-right:auto;"/> #> #> [[3]] #> <img src="https://i.cdn.turner.com/nba/nba/.element/img/4.0/global/logos/512x512/bg.white/svg/BKN.svg" style="margin-left:auto;margin-right:auto;"/> #> #> [[4]] #> <img src="https://i.cdn.turner.com/nba/nba/.element/img/4.0/global/logos/512x512/bg.white/svg/CHA.svg" style="margin-left:auto;margin-right:auto;"/> #> #> [[5]] #> <img src="https://i.cdn.turner.com/nba/nba/.element/img/4.0/global/logos/512x512/bg.white/svg/CHI.svg" style="margin-left:auto;margin-right:auto;"/> #>
# text slick_div('abc',type = 'p')
#> [[1]] #> <p style="margin-left:auto;margin-right:auto;">abc</p> #>