Skip to content

Configuration

Nugget allows you to define your own baked presets without much work.

Example

The below example allows you to define your own animation called zoom with different tweens. Calling zoom as true in any of your baked animations will make it automatically go for the in tween.

ts
defineNuxtConfig({
  // ...
  nugget: {
    baked: {
      custom: {
        zoom: {
          tweens: {
            in: {
              scale: ["100%", "110%"],
            },
            out: {
              scale: ["110%", "100%"],
            },
          },
          defaultTween: "in",
        },
      },
    },
  },
});

You can also override all the default presets by doing the following:

ts
defineNuxtConfig({
  // ...
  nugget: {
    baked: {
      defaults: {},
    },
  },
});

Released under the MIT License.