sigilUI

Preview Card

Reveal a link's context on hover or keyboard focus.

@sigil-ui/componentsReact

Preview

Live preview Interactive

Import

import { PreviewCard, PreviewCardTrigger, PreviewCardContent } from "@sigil-ui/components";

Usage

<PreviewCard>
  <PreviewCardTrigger href="/docs/installation">Installation guide</PreviewCardTrigger>
  <PreviewCardContent
    title="Set up Sigil"
    description="Install the library, load a preset, and compose your first page."
    side="bottom"
  />
</PreviewCard>

Use PreviewCardTrigger for the link and put the preview's title, description, and optional image on PreviewCardContent. The root coordinates open state and positioning.

Props

PreviewCard

PropTypeDescription
openbooleanControlled visibility.
defaultOpenbooleanInitial visibility in uncontrolled mode.
onOpenChange(open: boolean) => voidCalled when visibility changes.

PreviewCardContent

PropTypeDefaultDescription
titlestring—Preview heading.
descriptionstring—Supporting description.
imagestring—Optional image URL.
side"top" | "bottom" | "left" | "right""bottom"Preferred side of the trigger.
sideOffsetnumber8Distance from the trigger.
childrenReactNode—Additional preview content.

Accessibility

The trigger remains a normal link. The preview provides supplementary context, so the link text must explain the destination without requiring a hover.