# M variable font hover 2

> Hero headline — two lines with inverted weight axes contrast on hover

A shadcn/ui block from the [@cnippet](https://ui.cnippet.dev/) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/cnippet/m-variable-font-hover-2).

- Page, with a live preview: https://shadcn.exchange/r/cnippet/m-variable-font-hover-2
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/cnippet/m-variable-font-hover-2-light-94ec21f994e3132e.png
- Registry item: https://ui.cnippet.dev/r/m-variable-font-hover-2.json
- Categories: variable font hover
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://ui.cnippet.dev/r/m-variable-font-hover-2.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@cnippet/variable-font-hover`

## Files

### `registry/default/motion-variants/m-variable-font-hover-2.tsx`

```tsx
"use client";
import { VariableFontHover } from "@/registry/default/motion/variable-font-hover";

export default function VariableFontHoverHero() {
  return (
    <div className="flex min-h-50 flex-col items-center justify-center gap-2 px-6 text-center">
      <p className="text-muted-foreground text-sm">Hover the headline</p>
      <VariableFontHover
        className="cursor-default text-5xl tracking-tight"
        fromFontVariationSettings="'wght' 100, 'slnt' 0"
        label="Build faster."
        staggerDuration={0.02}
        staggerFrom="first"
        toFontVariationSettings="'wght' 900, 'slnt' -10"
        transition={{ duration: 0.5, type: "spring" }}
      />
      <VariableFontHover
        className="cursor-default text-5xl text-muted-foreground tracking-tight"
        fromFontVariationSettings="'wght' 900, 'slnt' -10"
        label="Ship with confidence."
        staggerDuration={0.02}
        staggerFrom="last"
        toFontVariationSettings="'wght' 100, 'slnt' 0"
        transition={{ duration: 0.5, type: "spring" }}
      />
    </div>
  );
}
```
