VibeUI
ComponentsDocs
VibeUI

Components with taste, that you own. Copy the source, retint the tokens, keep every line.

Library

  • All components
  • Signature pieces
  • Text effects
  • Footers

Docs

  • Introduction
  • Installation
  • Theming
  • CLI

Project

  • GitHub
  • Agents and MCP
  • Issues
  • MIT license
© 2026 VibeUI · MIT licensed
  1. Components
  2. Hover effects
  3. Hover Expand

Hover Expand

Row of panels; the hovered or focused one grows and reveals its body.

Hover effectsServer-safe

01

Type

Scramble, shimmer, stagger and roll.

02

Hover

Lift, shine, tilt and expand.

03

Footer

Simple, mega, CTA and legal.

Install

bash
npx @agents-npm-packages/vibeui add hover-expand --dir ./src/components/ui

Import

tsx
import { HoverExpand } from "@/components/ui/hover-expand"

API

Generated from the component's TypeScript types, so it always matches the source. * marks a required prop.

<HoverExpand>

PropTypeDefaultDescription
items*{ id: string; label: string; body: string; }[]—The items to render.
classNamestring—Extra classes, merged with the component's own.

Source

src/components/ui/hover-expand.tsx
import { cn } from "@/lib/utils";

/** Row of panels; the hovered or focused one grows and reveals its body. */
export function HoverExpand({
  items,
  className,
}: {
  items: { id: string; label: string; body: string }[];
  className?: string;
}) {
  return (
    <div className={cn("flex h-48 gap-2", className)}>
      {items.map((item) => (
        <div
          key={item.id}
          tabIndex={0}
          className="group relative flex min-w-0 grow basis-0 flex-col overflow-hidden rounded-lg border border-line bg-surface p-4 shadow-quiet outline-offset-2 transition-[flex-grow,border-color] duration-500 ease-out hover:grow-[3] hover:border-line-strong focus-visible:grow-[3]"
        >
          <p className="font-mono text-[11px] text-faint transition-colors group-hover:text-accent">
            {item.id}
          </p>
          <p className="mt-auto whitespace-nowrap text-[15px] font-medium tracking-[-0.01em] text-ink">
            {item.label}
          </p>
          <p className="mt-1.5 max-h-0 overflow-hidden text-[13px] leading-relaxed text-muted opacity-0 transition-[max-height,opacity] duration-500 ease-out group-hover:max-h-20 group-hover:opacity-100 group-focus-visible:max-h-20 group-focus-visible:opacity-100">
            {item.body}
          </p>
        </div>
      ))}
    </div>
  );
}

Exports HoverExpand. Peer dependencies: clsx, tailwind-merge.

PreviousHover CardNextHover Glow Grid