> A guide to [@fabiocv/ui](https://ui.fabio.cv/). Every guide is listed at https://ui.fabio.cv/llms.txt.

# Icons

One set of line icons, exported from `@fabiocv/ui/icons`.

```tsx
import { ArrowLeft, Copy } from '@fabiocv/ui/icons';

<Button leadingIcon={<ArrowLeft />}>Back</Button>;
<Button leadingIcon={<Copy />} aria-label="Copy email" />;
```

- Every icon is a `24px` box drawn in its middle `16px`. Measure padding and
  gaps to that `16px` drawing area, not the box: its `4px` of air on each side
  counts toward the space beside it.
- One stroke for all of them: `1.5px`, with round caps and joins. It draws in
  `currentColor`, so an icon takes the ink of the text beside it.
- `size` sets the box, `24` unless set, such as `20` beside `12px` text. The drawing scales with
  it, dots included, and the stroke stays `1.5px`.
- Corners have a `2px` radius. Dots are the only fills, `2.5px` across, so they
  read at the stroke's weight, apart from the dark half of Theme's circle.
- Each glyph fits a keyline so the set reads at one small size: a `14px` circle,
  a `12px` square or a `10 × 14px` page. Diagonals stop at about `10px`, because they read larger than a square of the same width. No glyph fills the `16px`.
- Glyphs for toggles are `12px` across whatever their shape, to sit beside the
  `14px` text of a small one: Display, Sun, Moon, Sound and Grid. A toggle of the
  default size takes the same glyphs.
- Brand marks are redrawn in the same stroke rather than filled.
- Sound and Grid move between two states on `SLIDE`. With `muted`, Sound's
  wave flattens to a line, and swells back without it. With `empty`, Grid's
  lines move out to the square's sides and curl into its `2px` corners, a
  frame, and move back in without it. With reduced motion they change at once.
- Icons are hidden from assistive technology. Name the control that holds one,
  or pass `aria-label` and `aria-hidden={false}` to an icon that stands alone.

## Types of `@fabiocv/ui/icons`

```ts
export type IconProps = ComponentPropsWithoutRef<'svg'> & {
    /** The box's width and height. The drawing scales with it. */
    size?: number;
};

export declare function ArrowLeft(props: IconProps): import("react").JSX.Element;

export declare function ArrowRight(props: IconProps): import("react").JSX.Element;

export declare function ArrowUp(props: IconProps): import("react").JSX.Element;

/** A link that opens in a new tab. Small, so it reads as a mark beside text. */
export declare function ArrowUpRight(props: IconProps): import("react").JSX.Element;

export declare function Check(props: IconProps): import("react").JSX.Element;

export declare function ChevronDown(props: IconProps): import("react").JSX.Element;

export declare function ChevronUp(props: IconProps): import("react").JSX.Element;

export declare function ChevronRight(props: IconProps): import("react").JSX.Element;

export declare function Close(props: IconProps): import("react").JSX.Element;

export declare function Copy(props: IconProps): import("react").JSX.Element;

/** For a small toggle, 12px across. */
export declare function Display(props: IconProps): import("react").JSX.Element;

export declare function Expand(props: IconProps): import("react").JSX.Element;

export declare function GitHub(props: IconProps): import("react").JSX.Element;

/**
 * Two lines each way, on the 12px square keyline. Empty, they move out into a
 * frame with 2px corners, and back in without it.
 */
export declare function Grid({ empty, ...props }: IconProps & {
    empty?: boolean;
}): import("react").JSX.Element;

export declare function LinkedIn(props: IconProps): import("react").JSX.Element;

/** For a small toggle, on the 12px keyline. */
export declare function Moon(props: IconProps): import("react").JSX.Element;

export declare function More(props: IconProps): import("react").JSX.Element;

/**
 * An arrow turning back round a circle to its start. Its head reaches the
 * corner, so it fits the 12px square keyline, as Search does.
 */
export declare function Reset(props: IconProps): import("react").JSX.Element;

export declare function Resume(props: IconProps): import("react").JSX.Element;

export declare function Search(props: IconProps): import("react").JSX.Element;

/** A sound wave. Muted, it flattens to a line, and swells back unmuted. */
export declare function Sound({ muted, ...props }: IconProps & {
    muted?: boolean;
}): import("react").JSX.Element;

/** For a small toggle, on the 12px keyline. */
export declare function Sun(props: IconProps): import("react").JSX.Element;

/** A circle on the 14px keyline, its light half open and its dark half filled. */
export declare function Theme(props: IconProps): import("react").JSX.Element;

export declare function X(props: IconProps): import("react").JSX.Element;
```

## Examples

### Glyphs

```tsx
<ArrowLeft />
<ArrowRight />
<ArrowUp />
<ArrowUpRight />
<Check />
<ChevronDown />
<ChevronUp />
<ChevronRight />
<Close />
<Copy />
<Display />
<Expand />
<GitHub />
<Grid />
<LinkedIn />
<Moon />
<More />
<Reset />
<Resume />
<Search />
<Sound />
<Sun />
<Theme />
<X />
```

### Sizes

```tsx
<Theme size={20} />
<Theme size={24} />
<Theme size={48} />
```

### Two states

```tsx
<Sound muted={false} />
<Grid empty={false} />
```

See it at https://ui.fabio.cv/icons/.
