usemods-nuxt

Nuxt module for usemods — auto-imports zero-dependency formatters, validators, generators, modifiers, browser helpers, and reactive Vue composables.
5,671 236
Install
npm install usemods-nuxt
Latest Version:1.18.0
Vue:3
License:MIT
Last Updated:Oct 22, 2026
Links: GitHub  ·  npm
Maintainer: jrmymbtlr

Frame 1209

Use Mods (Nuxt Module)

Auto-imported functions, modifiers, and reactive Vue composables for zippy Nuxt developers.

npm version npm downloads License CI CodeQL

Quick Setup

npx nuxi module add usemods-nuxt

What you get

  • Auto-imports for every export from usemods (formatNumber, slugify, detectBreakpoint, …)
  • Reactive composables for helpers that need event listeners (SSR-safe defaults until mounted):
Composable Wraps
useScrollPosition detectScrollPosition
useMousePosition detectMousePosition
useRelativeMousePosition detectRelativeMousePosition
useWindowSize detectWindowSize
useActiveBrowser detectActiveBrowser
useColorScheme detectColorScheme
useBreakpoint detectBreakpoint
useContainerBreakpoint detectContainerBreakpoint
useNetworkStatus detectNetworkStatus
useOrientation isPortrait / isLandscape
<script setup>
const breakpoint = useBreakpoint()
const size = useWindowSize()
const { isPortrait, isLandscape } = useOrientation()
</script>

Alias option

Remap auto-imported names via nuxt.config:

export default defineNuxtConfig({
  modules: ['usemods-nuxt'],
  usemods: {
    alias: [
      ['formatNumber', 'fmt'],
    ],
  },
})

AI / coding agents

Docs optimized for agents: usemods.com/llms.txt, AGENTS.md, and the AI discovery checklist.

Manual Setup

  1. Add usemods-nuxt dependency to your project
# Using pnpm
pnpm add -D usemods-nuxt

# Using yarn
yarn add --dev usemods-nuxt

# Using npm
npm install --save-dev usemods-nuxt
  1. Add usemods-nuxt to the modules section of nuxt.config.ts
export default defineNuxtConfig({
  modules: ["usemods-nuxt"],
})

That's it! You've got every mod util (and the reactive composables) in your Nuxt app ✨🛵

Related Packages

usemods

Zippy little modifiers and utilities for your frontend.

59,884 236
nuxt-request-context

Provide typed request-specific data to Nuxt before the initial render.

979 1
nuxt-hydration-gate

Mark Nuxt app hydration with a DOM attribute for CSS, scripts, and end-to-end te...

211 0
@verbaly/nuxt

Nuxt integration for Verbaly: zero-config module with per-request locale negotia...

8,706 4
@vitral/nuxt

The Nuxt module for Vitral: the plugin from nuxt.config, auto-imported component...

2,999 3

Version History

Version Released Vue License
1.18.0 ^3.0 MIT
1.16.0 ^3.0 MIT
1.15.0 ^3.0 MIT
1.14.1 ^3.0 MIT
1.14.0 ^3.0 MIT