Corpora UI
Atoms

File icons

Fourteen file-format icons — seven formats in badge and wordmark families. Each embeds light and dark artwork and switches on Tailwind's dark variant: pure CSS, no props, no hydration flash.

Usage

import { FileBadgeTei, FileWordmarkPdf } from "@exegia/corpora-ui"

<FileBadgeTei />                         // 64×64, follows the app's dark class
<FileBadgeTei size={96} />               // any size
<FileWordmarkPdf title={null} />         // decorative: aria-hidden
<div className="dark">
  <FileBadgeTei />                       {/* dark artwork, regardless of theme */}
</div>

API reference

PropTypeDefaultDescription
sizenumber | string64Rendered width and height.
titlestring | nulle.g. "TEI file"Accessible name (role=img + aria-label). Pass null to mark the icon decorative — it becomes aria-hidden with role=presentation.
className / …propsSVGProps<SVGSVGElement>—Everything else is forwarded to the root <svg>. Theme switching needs no props: the light layer is dark:hidden, the dark layer hidden dark:inline, so the artwork follows whatever drives the app's dark variant — scope a dark class to force one theme.

Last updated on

On this page