Skip to content

Files

kitchen-sink-svelte

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 6, 2025
Mar 6, 2025
Mar 6, 2025
Mar 6, 2025
Mar 6, 2025
Mar 6, 2025
Mar 6, 2025
Mar 6, 2025
Mar 6, 2025
Mar 6, 2025

Svelte example

An example that shows how to write a custom element and then use it in a Svelte component's template including type checking, autocompletion, and intellisense.

Running the example

install dependencies

For this example, use the following command to install dependencies if you will run it inside of a cloned @lume/element repo:

npm clean-install --no-workspaces --install-links

If that doesn't work due to the package-lock (sometimes it fails when the linked package changes), run

npm install --no-workspaces --install-links

If you will copy this example to a standalone folder, outside of the @lume/elemenet code repository, modify the package.json file so that this dependency,

"@lume/element": "../.."

is replaced with the latest version range of the @lume/element package, for example:

"@lume/element": "^0.15.0"

and then run

npm install

Run the example

Now you can run

npm run dev

to run the example in dev mode, which means that the example will automatically refresh when you save any files.

Use

npm run build

to build the app into files that you can publish onto a web server for production.

If any questions, reach out on the Lume chat server or the forum (preferred, but you should join both to get the best help).