Installation
There are two ways to get Runeglow into a Svelte 5 project. Most people want the first.
What you need
- Svelte 5. The components are written with runes.
- Any setup that builds Svelte: SvelteKit, or Vite with the Svelte plugin. The components render on the server and start animating once the page loads.
- One library, Image generation, also needs
three. The others need nothing else.
1. Install the package
Add it with your package manager.
pnpm add runeglow Import a library from its own path and use it. Each path is separate, so your app only bundles the libraries you import, however many the package contains.
<script>
import { BorderBeam } from 'runeglow/border-beam';
</script>
<BorderBeam>
<div class="card">Your content here</div>
</BorderBeam>Import paths
| Library | Import from |
|---|---|
| Border beam | runeglow/border-beam |
| Thinking orbs | runeglow/thinking-orbs |
| Bot avatars | runeglow/bot-avatars |
| Gooey | runeglow/liquid-gooey |
| Voice | runeglow/voice-glow |
| Voice ring | runeglow/voice-ring |
| Liquid metal | runeglow/metal-fx |
| Image generation | runeglow/img-fx |
| Distortion waves | runeglow/distortion-waves |
Image generation needs three
Install three next to the package if you use runeglow/img-fx. If you don’t use it, skip this.
pnpm add runeglow threeUpdating
Update it like any other dependency, for example pnpm update runeglow. Types are included, so there is nothing else
to install for TypeScript.
2. Copy the source
Each library is also published as a shadcn-svelte registry item. Instead of depending on the package, the shadcn-svelte CLI copies that one library’s source files into your project, where you can read and change them.
Before you start
The CLI needs a project it has been set up in: a SvelteKit project with a components.json file. If you already use shadcn-svelte, you have one. If
not, create it first:
npx shadcn-svelte@latest initAdd a library
Run the command for the library you want. This one adds Border beam:
npx shadcn-svelte@latest add https://runeglow.dev/r/border-beam.jsonThe files are written to src/lib/runeglow/border-beam/. Import from
there:
<script>
import { BorderBeam } from '$lib/runeglow/border-beam';
</script>
<BorderBeam>
<div class="card">Your content here</div>
</BorderBeam>Commands for each library
| Library | Command |
|---|---|
| Border beam | npx shadcn-svelte@latest add https://runeglow.dev/r/border-beam.json |
| Thinking orbs | npx shadcn-svelte@latest add https://runeglow.dev/r/thinking-orbs.json |
| Bot avatars | npx shadcn-svelte@latest add https://runeglow.dev/r/bot-avatars.json |
| Gooey | npx shadcn-svelte@latest add https://runeglow.dev/r/liquid-gooey.json |
| Voice | npx shadcn-svelte@latest add https://runeglow.dev/r/voice-glow.json |
| Voice ring Also copies Voice and Thinking orbs. | npx shadcn-svelte@latest add https://runeglow.dev/r/voice-ring.json |
| Liquid metal | npx shadcn-svelte@latest add https://runeglow.dev/r/metal-fx.json |
| Image generation Also adds three to your dependencies. | npx shadcn-svelte@latest add https://runeglow.dev/r/img-fx.json |
| Distortion waves | npx shadcn-svelte@latest add https://runeglow.dev/r/distortion-waves.json |
Without Tailwind
The CLI checks for Tailwind CSS and stops if it is missing. Runeglow doesn’t use Tailwind, so you can tell the CLI to carry on:
npx shadcn-svelte@latest add https://runeglow.dev/r/border-beam.json --skip-preflightIt still needs a components.json in the project root. Without Tailwind,
create the file yourself with this in it:
{
"$schema": "https://shadcn-svelte.com/schema.json",
"tailwind": { "css": "src/app.css", "baseColor": "slate" },
"aliases": {
"components": "$lib/components",
"utils": "$lib/utils",
"ui": "$lib/components/ui",
"hooks": "$lib/hooks",
"lib": "$lib"
},
"typescript": true,
"registry": "https://shadcn-svelte.com/registry"
}If this is all you want shadcn-svelte for, installing the package is the simpler route.
Updating
Copied files don’t update themselves. Run the command again with --overwrite to pull the current version. That replaces the files, so
any changes you made to them are lost.
npx shadcn-svelte@latest add https://runeglow.dev/r/border-beam.json --overwriteWhich one should I use?
| Install the package | Copy the source | |
|---|---|---|
| Works without shadcn-svelte | Yes | No |
| Updates | With your package manager | Run the command again |
| Editing the code | No | Yes, it is in your project |
| What your app bundles | Only what you import | Only what you copied |
| On your disk | All nine libraries, about 2 MB | Only the ones you add |
Both ship the same code: the registry is generated from the package’s source.
Next
Open any library’s page for its playground. Tune the options there, then copy the code, or a prompt for your coding agent.
Open the playgroundIf something goes wrong
- “Cannot find module three”. You are using Image generation without
threeinstalled. Add it as shown above. - Nothing is drawn. Liquid metal, Image generation and Distortion waves need WebGL 2. Where the browser lacks it, they show your own element without the effect.
- The CLI says it needs Tailwind. Add
--skip-preflight, as shown above. - An effect is wider than the element it wraps. Border beam and Voice render a
block wrapper. Give the wrapper
style="width: fit-content".