Why do we need slots: default:?

I’ve always wondered why we need to have default: under slots:. This begs the question: why do we need to have “default” and what else can go under “slots” other than “default”?

Different slots give you access to different parts of a widget. Most widgets have a default slot which is just a short cut to the most commonly used of its explicitly defined slots. Here’s an brief example highlighting the numerous slots available on an f7-list-item

But different widget will have different slots depending on function. You can always look at the f7 docs to get an idea of what widgets have which slots defined, but the don’t expect all of those to be available in the oh- versions.

Unfortunately, there isn’t documentation yet on which slots oh- widgets do have, you have to look through the vue files in the source code or just try it out in the widget editor and see if you get the result you want.

just in case - vue files are here

And the markdown source for the docs are here if you feel like writing some :wink:

You can use the oh-button page as an example and autogenerated docs (like this) have descriptions and commented out sections, including one to describe the slots. Just remove the comments to add the section to the page. Results are regularly pushed to: