# Sizes

> 6 sizes from 18px to 56px drawing the same icon, tuned to stay legible at 18px.

A shadcn/ui block from the [@reui](https://reui.io) registry, listed on [shadcn.exchange](https://shadcn.exchange/r/reui/c-file-type-3).

- Page, with a live preview: https://shadcn.exchange/r/reui/c-file-type-3
- Screenshot: https://abzjhwgwpdpz7ua5.public.blob.vercel-storage.com/shots/reui/c-file-type-3-light-72a5ef16b6ecd20a.png
- Registry item: https://reui.io/r/new-york-v4/c-file-type-3.json
- Listed: 2026-10-13, source last changed 2026-10-13

## Install

```bash
npx shadcn@latest add https://reui.io/r/new-york-v4/c-file-type-3.json
```

Run it in a project that has shadcn/ui set up. It adds the files below and installs what they depend on.

## Dependencies

- Registry items: `@reui/file-type`

## Files

### `c-file-type-3.tsx`

```tsx
import {
  FileType,
  type FileTypeProps,
} from "@/components/reui/file-type"

const sizes = [
  { size: "mini", px: 18 },
  { size: "xs", px: 24 },
  { size: "sm", px: 32 },
  { size: "default", px: 40 },
  { size: "lg", px: 48 },
  { size: "xl", px: 56 },
] as const satisfies readonly { size: FileTypeProps["size"]; px: number }[]

export function Pattern() {
  // Every caption is 2 lines, so `items-end` lines up the icons' bottoms.
  return (
    <div className="mx-auto flex w-fit items-end gap-6">
      {sizes.map(({ size, px }) => (
        <div key={size} className="flex flex-col items-center gap-3">
          <FileType type="pdf" size={size} />
          {/* A zero-width caption centers on the icon without widening its
              column, so the gaps between icons are equal, not between
              captions ("default" is wider than its icon). */}
          <span className="flex w-0 flex-col items-center text-xs whitespace-nowrap">
            <span className="font-medium">{size}</span>
            <span className="text-muted-foreground tabular-nums">{px}px</span>
          </span>
        </div>
      ))}
    </div>
  )
}
```
