Using htmlDependency()

Then we just need to the created element and the dependency into tagList() function.

my_card_with_deps <- function(...) {
  
  cardTag <- my_card(...)

  tagList(cardTag, mdb_card_dep())

}

Now we can share our element in a package.