1.0.0-beta.2 • Published 1 day ago

@fdcn/nugget v1.0.0-beta.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 day ago

Nugget

Nugget

npm version npm downloads License Nuxt

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.

Nugget Preview

Usage

<script setup lang="ts">
const container = ref<HTMLDivElement | null>(null);

const { play } = useBakedTransition({
  parentContainer: container,
  animationOptions: {
    translate: true,
    scale: "in",
    skew: "bottom",
  },
});
</script>

<template>
  <button @click="play()">Hello!</button>
  <h1
    v-split-animate="{
      baked: true,
      options: {
        splitBy: 'lines',
        animationOptions: { translate: true },
        splitOptions: {
          wrapping: {
            select: 'lines',
            wrapClass: 'inline-block overflow-hidden',
          },
        },
      },
    }"
  >
    Nuxt is so cool, and this module is quite awesome.
  </h1>
</template>

Quick Setup

  1. Add @fdcn/nugget dependency to your project
# Using pnpm
pnpm add -D @fdcn/nugget

# Using yarn
yarn add --dev @fdcn/nugget

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

That's it! You can now use Nugget Module in your Nuxt app ✨

Roadmap

  • Make non-scroll controlled infinite marquee.
  • Make hover stop marquee.
  • Docs page
  • Custom baked presets (#2)
  • Simplify directives (#6)
  • Button hover effects (#3)
  • Page transitions (#5)
  • Tests
  • Image hover effects
  • Tooltip effects
  • Vue version

Development

# 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
1.0.0-beta.2

1 day ago

1.0.0-beta.0

4 days ago

1.0.0-beta.1

4 days ago

0.3.1

4 months ago

0.3.0

4 months ago

0.2.0

4 months ago

0.1.9

5 months ago

0.1.8

5 months ago

0.1.7

5 months ago

0.1.6

6 months ago

0.1.5

6 months ago

0.1.4

6 months ago

0.1.3

6 months ago

0.1.2

6 months ago

0.1.1

6 months ago

0.1.0

6 months ago

0.0.1

6 months ago