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-cardprops
| name | type | default | description |
|---|---|---|---|
| name * | string | - | file name shown on the front paper. |
| meta | string | - | small uppercase kicker line above the name, e.g. 'pdf · 1.2 mb'. |
| href | string | - | link target; renders the card as an anchor. |
| onClick | () => void | - | click handler; without href the card renders as a <button>. |
| download | boolean | string | - | sets the anchor's download attribute (true, or a filename to save as). |
| linkComponent | React.ElementType | 'a' | anchor element/component — pass your router's Link. |
| layers | number | 1 | paper layers behind the front card, forwarded to stack. |
| className | string | - | overrides on the root element. |