FileCard. A descriptive file link or download.
- Technical content
- Static
- Stability · Initial
- ::postkit-file-card
postkit-content-model.pdf
The portable document and component contract.
Usage.
<FileCard
href="#component-preview"
name="postkit-content-model.pdf"
description="The portable document and component contract."
fileType="PDF"
fileSize="2.4 MB"
download
/>Props. Always in step with the code.
| Prop | Type | Default | Description |
|---|---|---|---|
| hrefRequired | string | None | The file URL. |
| nameRequired | string | None | The displayed filename. |
| description | string | None | Supporting file description. |
| fileType | string | None | The file format label. |
| fileSize | string | None | The human-readable size. |
| download | boolean | true | Whether the link requests a download. |
| actionLabel | string | None | The visible action text. |
| Appearance | |||
| size | "sm" | "md" | "lg" | "md" | The component density and type scale. |
| variant | "outline" | "subtle" | "plain" | "subtle" | The component visual treatment. |
Every component also takes unstyled and the part-styling props. Change a default for your whole site with defaults in createPostkit. Part styles
Anatomy. Every part is yours to restyle.
Every part
- root
- icon
- content
- name
- description
- meta
- action
Renderers. One component, everywhere you publish.
- Headless @postkit/reactSupported
- Chakra @postkit/chakraSupported
- Email @postkit/emailAs text
- Astro @postkit/astroStatic
- Web components @postkit/elementsPlanned