Skip to content

Fill Link

Full-width link row that fills on hover, inverts its text and nudges its content inward.

$npx shadcn@latest add https://framebrick.co/r/fill-link.json

From the Nitip template, see it in context.

Examples

With a photo

A small photo before the label: on hover the row fills, the photo shrinks away and a round arrow takes its place.

<FillLink href="/programs/strength" thumb={<img src="/programs/strength.jpg" alt="" />}>Strength basics</FillLink>

Installation

$ npx shadcn@latest add https://framebrick.co/r/fill-link.json

Usage

import { FillLink } from "@/components/ui/fill-link";

<FillLink href="https://instagram.com/studio" meta="@studio">Instagram</FillLink>

Props

PropTypeDefaultDescription
hrefstring—Link target. http(s) links open in a new tab.
metaReactNode—Shown at the right of the row before the arrow (a handle, a value, a date).
arrowbooleantrueShow the arrow that turns from ↘ to → on hover.
thumbReactNode—A small photo (an image with an empty alt text) before the label: on hover it shrinks away and a round 24 px arrow takes its place at the end (Fitbricks).
…propsanchor props—Passed to the link.
  • thumb is the Fitbricks program link in its sidebar: on hover the row fills and takes 10 px at each side, the photo (64 × 44, 12 px from the label) shrinks to width 0 and fades, and a round 24 px arrow comes in at the end in its place, all on a 0.4 s tween, cubic-bezier(0.44, 0, 0.56, 1). The photo and the arrow are decoration: the link is named by its text. Width is a size key, so with <MotionConfig reducedMotion="user"> the photo goes at once and the arrow still fades in. Without thumb the row is as it was, with its turning arrow.
  • Keyboard focus fills the row too, so it never looks inert while tabbing.
  • With reduced motion the content does not shift; padding is neither a transform nor a size key, so MotionConfig leaves it running.

AI prompt

Paste into v0, Lovable, Bolt or Claude to rebuild this component in your own project.

Create a React + Tailwind CSS + Motion (motion/react) component called FillLink using Next.js Link.
- A full-width row: label on the left, optional meta and an arrow on the right, border-b, py-3, text-sm, text-foreground.
- On hover and on keyboard focus the row fills: bg-foreground with text-background, as a 300ms CSS color transition
  (theme colors, not fixed black and white).
- The label slides 12px right and the right-hand group slides 12px left, with a spring (bounce 0.2, duration 0.4s);
  with useReducedMotion() the shift is 0, since padding is neither a transform nor a size key.
- The arrow (down-right) rotates -45° on hover so it points right, same spring.
- External http(s) links open in a new tab with rel noopener noreferrer.
- thumb (a node, an image with an empty alt text): before the label a motion.span (aria-hidden, overflow hidden, flex) animates width 76 to 0 and opacity 1 to 0 on a 0.4s tween with ease [0.44, 0, 0.56, 1]; inside it a 64 x 44 rounded-md box with mr-3. The side padding shift is 10px, not 12. At the end, in place of the turning arrow, a size-6 rounded-full bg-background text-foreground circle holding a right arrow animates opacity 0 to 1 and scale 0.6 to 1 on the same tween.

Be the first to know

Get new templates and components first

One short email when we release a template or a free component. No spam — unsubscribe anytime.

We use your email only for Framebrick updates. Privacy policy