Pass a Default Slot
It would be great to support dynamic slots for variants, but it would be error-prone until Svelte officially supports that. However, we can support an optional default slot of a string (you can pass html) or a component as seen in the variants below.
Possible dynamic slot options to research further:
- https://github.com/sveltejs/svelte/issues/2588
- https://github.com/sveltejs/svelte/pull/4296
- Playwright does them like this: L82
Component
Variants
Edit page on GitHub