ValyroUI Русская версия

Link Preview

Page preview on link hover. Pro · Animated components › Link previews

A link that shows a preview card of its target on hover or keyboard focus — an image of the page, a title and the address — springing out beside the link, optionally sliding along it after the pointer. The card is a bonus for sighted pointer users; the link works as a plain link everywhere.

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add link-preview
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { LinkPreview } from 'valyro-ui-pro';

Props

PropTypeDefault
href *stringThe link's address; a normal click still follows it.
children *ReactNodeThe link text.
imagestringPicture of the target page — from your screenshot service or a prepared image. The component never fetches the page itself (cross-origin pages can't be captured in the browser).
titleReactNodeHeading of the preview (default: none).
descriptionReactNodeA line about the target page.
widthnumber240Width of the preview image, px (default 240); its height keeps a 16:9 ratio.
placementPlacement'top'Side of the link the preview opens on (default top).
openDelaynumber300Delay before opening on hover or keyboard focus, ms (default 300).
closeDelaynumber150Delay before closing once the pointer leaves the link and the card, ms (default 150).
followCursorbooleanfalseThe preview slides along the link after the pointer, on a spring (default false).

Related components

  • Toggle — Toggle button with a springy response
  • Flip Button — Two-sided button that flips on a spring
  • Liquid Button — Button that fills with “liquid” on hover
  • Theme Toggler — Light/dark switch with a View Transitions reveal
  • GitHub Stars Button — Repository link with a rolling star count
  • Share Button — Button that fans out social icons
  • Code Tabs — Code variants in tabs: npm, pnpm, bun, with copy
  • Number Wheel — Number on a spinning wheel with neighboring values
  • Pin List — Pinnable list: items glide between groups
  • Notification Stack — Notification stack that expands into a list
  • Todo List — Checklist with a wavy strike-through on done items
  • Presence Avatars — Who’s online: avatars rearrange as status changes

Previous: Radial Intro · Next: Folded Depth Cards · All Animated components