Loaders

Wobble

Solitory dot that glides from side to side.

Installation

Add the keyframe

Add the keyframe to the keyframes object in your tailwind.config.js file.

tailwind.config.ts
import type { Config } from 'tailwindcss';
 
const config: Config = {
  // ...
  theme: {
    // ...
    extend: {
      // ...
      keyframes: {

        wobble: {
          '0%': { transform: 'translateX(0)' },
          '50%': { transform: 'translateX(3rem)' },
          '100%': { transform: 'translateX(0)' },
        },
      },
    },
  },
};
 
export default config;

Add the animation

Add the animation to the animation object in your tailwind.config.js file.

tailwind.config.ts
import type { Config } from 'tailwindcss';
 
const config: Config = {
  // ...
  theme: {
    // ...
    extend: {
      // ...
      animation: {
        wobble: 'wobble 1s ease-in-out infinite', 
      },
    },
  },
};
 
export default config;

On this page