Zero-dependency functions and modifiers for zippy developers.
Use your favourite package manager to install usemods. Also works with your least favourite package manager.
npm install usemods
pnpm add usemods
bun add usemods
If you use Nuxt, you can automatically add the module to your nuxt.config.js. We're actively working on composables and other Nuxt-specific features, so stay tuned!
npx nuxi module add usemods-nuxt
Once you've installed the package, you can import the functions as you need. We'll add better examples in the future, but hopefully your familiar with the basics.
<!-- Vue -->
<template>
<div>
{{ formatNumber(123456789) }}
</div>
<button @click="copyToClipboard('Hello, world!')">
Copy to clipboard
</button>
</template>
<script setup>
import { copyToClipboard, formatNumber } from 'usemods'
</script>
Welcome to the documentation for Mods. We combine Nuxt Content and Vue Components to achieve interactive blocks.
To make content changes to the docs, please refer to the original ./src
and use pnpm dev
to compile update-to-date markdown files here. You can read more on the compiler in ./docs/docs.mjs
To make changes to how the Mod displays and interacts, please see the corresponding .vue
files found in ./nuxt-web/components/content/
To run the UseMods website, run pnpm dev
from the website folder which should perform any installs first, then checkout localhost:3000
. This will also initiate a recursive watcher on the ./src
folder to automatically generate documentation from the JSDOCs of each function and sync changes made to the functions.