usemods
v1.15.0
Published
Zippy little modifiers and utilities for your frontend.
Maintainers
Readme
Use Mods (usemods).
Zero-dependency functions and modifiers for zippy developers.
Installation
Use your favourite package manager to install usemods. Also works with your least favourite package manager.
npm install usemods
pnpm add usemods
bun add usemodsNuxt
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-nuxtUsage
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>Contributing
Welcome to the documentation for Mods. We combine Nuxt Content and Vue Components to achieve interactive blocks.
Content
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
Vue Components
To make changes to how the Mod displays and interacts, please see the corresponding .vue files found in ./nuxt-web/components/content/
Running the Website
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.
