https://github.com/stevenjpx2/nugget
Democratize premium animations ✨
https://github.com/stevenjpx2/nugget
gsap locomotive-scroll nuxt nuxt-module nuxt3 vue
Last synced: 6 months ago
JSON representation
Democratize premium animations ✨
- Host: GitHub
- URL: https://github.com/stevenjpx2/nugget
- Owner: StevenJPx2
- License: mit
- Created: 2023-09-16T13:35:58.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-16T13:21:09.000Z (over 1 year ago)
- Last Synced: 2025-03-23T19:39:12.478Z (7 months ago)
- Topics: gsap, locomotive-scroll, nuxt, nuxt-module, nuxt3, vue
- Language: TypeScript
- Homepage: https://nugget.stevenjohn.co
- Size: 5.5 MB
- Stars: 13
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Nugget

[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]Democratize **premium** animations using nugget. Nugget exposes different
headless, unstyled composables and components to allow you to have the
flexibility to animate what you want, but also has sane, beautiful presets that
you do not have to break your head over.- [✨ Release Notes](/CHANGELOG.md)
- [📖 Documentation](https://nugget.stevenjohn.co) 

## Usage
```vue
const container = ref<HTMLDivElement | null>(null);
const { play } = useBakedTransition({
parentContainer: container,
animationOptions: {
translate: true,
scale: "in",
skew: "bottom",
},
});Hello!
Nuxt is so cool, and this module is quite awesome.
```
## Quick Setup
1. Add `@fdcn/nugget` dependency to your project
```bash
# Using pnpm
pnpm add -D @fdcn/nugget# Using yarn
yarn add --dev @fdcn/nugget# Using npm
npm install --save-dev @fdcn/nugget
```2. Add `@fdcn/nugget` to the `modules` section of `nuxt.config.ts`
```js
export default defineNuxtConfig({
modules: ["@fdcn/nugget"],
});
```That's it! You can now use Nugget Module in your Nuxt app ✨
## Roadmap
- [x] Make non-scroll controlled infinite marquee.
- [x] Make hover stop marquee.
- [x] Docs page
- [x] Custom baked presets [(#2)](https://github.com/StevenJPx2/nugget/issues/2)
- [x] Simplify directives [(#6)](https://github.com/StevenJPx2/nugget/issues/6)
- [ ] Button hover effects [(#3)](https://github.com/StevenJPx2/nugget/issues/2)
- [ ] Page transitions [(#5)](https://github.com/StevenJPx2/nugget/issues/5)
- [ ] Tests
- [ ] Image hover effects
- [ ] Tooltip effects
- [ ] Vue version## Development
```bash
# Install dependencies
npm install# Generate type stubs
npm run dev:prepare# Develop with the playground
npm run dev# Build the playground
npm run dev:build# Run ESLint
npm run lint# Run Vitest
npm run test
npm run test:watch# Release new version
npm run release
```[npm-version-src]: https://img.shields.io/npm/v/@fdcn/nugget/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npmjs.com/package/@fdcn/nugget
[npm-downloads-src]: https://img.shields.io/npm/dm/@fdcn/nugget.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npmjs.com/package/@fdcn/nugget
[license-src]: https://img.shields.io/npm/l/@fdcn/nugget.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://npmjs.com/package/@fdcn/nugget
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt.js
[nuxt-href]: https://nuxt.com
[gsap-href]: https://gsap.com/
[locomotive-href]: https://github.com/locomotivemtl/locomotive-scroll/tree/v5-beta