Skip to content

Web Component Support for Skeleton Components #2908

@TazorDE

Description

@TazorDE

Describe the feature in detail (code, mocks, or screenshots encouraged)

Using Svelte it is possible to export Components as Web-Components so they are more generally available.
This can be done by adding the following tag-option to an existing Svelte-Component:

<svelte:options customElement="my-element" />

Once a custom element has been defined, it can be used as a regular DOM element after importing the script that defines it.

With that we can quickly and relatively cheaply expand Skeletons availability beyond supporting just selected frameworks and be generally available in the web. And while dedicated framework support is always better than web components it should be a great intermediary option.

Installing tailwind will be difficult to document for this so this should reference the tailwind documentation directly I think.

What type of pull request would this be?

New Feature

Provide relevant links or additional information.

Svelte Documentation: https://svelte.dev/docs/svelte/custom-elements

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestRequest a feature or introduce and update to the project.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions