@aksharahegde/nuxt-glow
| Install | |
|---|---|
npm install @aksharahegde/nuxt-glow |
|
| Latest Version: | 2.0.0 |
| Vue: | 3 |
| License: | MIT |
| Last Updated: | Oct 24, 2026 |
| Links: | GitHub · npm |
Nuxt Glow
Add a mouse-tracing glow effect to Nuxt components.
Plugin for Vue 3 also available: Vue Glow
Checkout downloads on NPM Chart.
Installation
Install the package using your favorite package manager:
pnpm i @aksharahegde/nuxt-glow
Usage
- Add the
@aksharahegde/nuxt-glowplugin to yournuxt.config.ts
export default defineNuxtConfig({
modules: ["@aksharahegde/nuxt-glow"],
});
- Wrap any number of
<GlowElement>components in a<GlowCapture>which will be used to track the mouse location.
<template>
<GlowCapture>
<span>This won't glow</span>
<GlowElement color="purple">
<p class="text-black glow:text-glow/50 glow:bg-red-100">
This will glow purple when the mouse is passed over
</p>
</GlowElement>
</GlowCapture>
</template>
Children of <GlowElement> can style themselves how to look when glowing. You might choose to leave some children unchanged, or highlight them with the glow: variant style.
The value of color will be available as a CSS variable --glow-color, as well as the Tailwind glow color.
You can pass any valid CSS color, including hsl() values etc.
Of course, you might choose to use any other color; you can leave out the color prop entirely.
Tailwind
The module registers the glow: variant and glow color automatically when you use Nuxt Glow with Tailwind CSS v4.
For manual setup, import the CSS extension in your main stylesheet:
@import "@aksharahegde/nuxt-glow/tailwind.css";
For Tailwind CSS v3, use the legacy JS plugin:
tailwind.config.js
module.exports = {
...
plugins: [
require('@aksharahegde/nuxt-glow/tailwind')
]
}
As with all colors in Tailwind, you may add opacity by appending a percentage after the color, such as bg-glow/20 for 20% opacity.
DevTools v4 (optional)
Nuxt ships with DevTools enabled, but this repo can opt into DevTools v4 (alpha) for development.
In your pnpm-workspace.yaml, add an override:
overrides:
'@nuxt/devtools': 'npm:@nuxt/devtools-nightly@latest'
DevTools v4 requires Vite 8. After changing overrides, reinstall dependencies (delete pnpm-lock.yaml if needed).
Contributing 🙏
- Clone this repository
- Install dependencies using
pnpm install - Run
npm run dev:prepareto generate type stubs. - Use
npm run devto start playground in development mode. - Once development is complete, create PR to this repository.
Attribution
- Module is inspired by React Glow by Codaworks
- Playground card is version of https://codepen.io/_rahul/pen/MWrozMX by rahul
Related Packages
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 2.0.0 | ^3.0 | MIT | |
| 1.3.0 | ^3.0 | MIT | |
| 1.2.0 | ^3.0 | MIT | |
| 1.1.5 | ^3.0 | MIT | |
| 1.1.3 | ^3.0 | MIT | |
| 1.1.2 | ^3.0 | MIT | |
| 1.1.1 | ^3.0 | MIT | |
| 1.0.3 | ^3.0 | MIT | |
| 1.0.0 | ^3.0 | MIT |