Getting started

Installation

Two minutes from an empty project to your first animated component.

  1. Start with a Tailwind project

    Any React framework works: Next.js, Vite, React Router, Astro. If you have not set up shadcn yet, initialise it once. It adds the theme tokens and the cn helper the components rely on.

    $pnpm dlx shadcn@latest init
  2. Add a component

    Every component page shows its own command. For example:

    $pnpm dlx shadcn@latest add "https://pixelpapa.com/r/magnetic-button.json"

    The CLI writes the file to components/pixelpapa/ and installs motion and lucide-react if the component needs them.

  3. Use it

    import { MagneticButton } from "@/components/pixelpapa/magnetic-button";
    
    export default function Page() {
      return <MagneticButton>Start building</MagneticButton>;
    }

    Each file also default-exports a demo. Keep it as a reference or delete it once you have wired the component in.

Shorter commands with a namespace

Add the registry to components.json once and install by name with shadcn add @pixelpapa/magnetic-button.

{
  "registries": {
    "@pixelpapa": "https://pixelpapa.com/r/{name}.json"
  }
}

Unlimited components

Components and site templates marked Unlimited need an Unlimited plan. The CLI signs in with an API key:

  1. Create a key on the API & Settings page and save it in your project's .env.local as PIXELPAPA_API_KEY=pp_live_….
  2. Add the registry with the key to components.json:
{
  "registries": {
    "@pixelpapa": {
      "url": "https://pixelpapa.com/r/{name}.json",
      "headers": { "Authorization": "Bearer ${PIXELPAPA_API_KEY}" }
    }
  }
}

Then install any component by name, for example npx shadcn@latest add @pixelpapa/hero-before-after-toggle. Free components install the same way.

Requirements

  • React 18 or 19.
  • Tailwind CSS v4. Components use v4 syntax such as size-*, container-free arbitrary values and @theme tokens.
  • The shadcn colour tokens (--background, --foreground, --primary, --muted, --border, --card and friends). The Theme Builder tool can generate a set.
  • Interactive components are marked "use client", so they work in Server Component frameworks without changes.