components / file-card

file-card.

animated stacked-paper download card — papers fan out on hover, still under reduced motion. renders as a link or button. composes stack.

installation
bunx @justin06lee/chrome@latest add file-card
props
nametypedefaultdescription
name *string-file name shown on the front paper.
metastring-small uppercase kicker line above the name, e.g. 'pdf · 1.2 mb'.
hrefstring-link target; renders the card as an anchor.
onClick() => void-click handler; without href the card renders as a <button>.
downloadboolean | string-sets the anchor's download attribute (true, or a filename to save as).
linkComponentReact.ElementType'a'anchor element/component — pass your router's Link.
layersnumber1paper layers behind the front card, forwarded to stack.
classNamestring-overrides on the root element.