An example that shows how to write a custom element and then use it in a React 19 component's template including type checking, autocompletion, and intellisense.
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
-
npm run dev
- Builds in watch mode. -
npm run build
- Builds once, ready to deploydist/
. -
npm run server
- Starts a server to preview the app.
If any questions, reach out on the Lume chat server or the forum (preferred, but you should join both to get the best help).