Frontend Recipes

Introduction

What Frontend Recipes is, and what it refuses to be.

Frontend Recipes is a React component library built on one rule: every piece must be small enough to read, copy, and own.

It is not a package you install. Each component is a .tsx file and a .css file that you copy into your project and import by path. react is the only thing it needs — everything a component library usually delegates — merging class names, controlled state, focus trapping, scroll locking, wiring labels to inputs — is in those files, short enough to finish in one sitting.

What that means in practice

  • There is no dependencies list, because there is no package. The files import React and each other, nothing else.
  • The internal helpers total roughly three hundred lines across five files in internal/.
  • Styles are plain CSS by default, with Tailwind and StyleX versions of every component to copy instead if your project already uses them. There is no CSS-in-JS runtime and no build step in the default flavor.
  • Nothing is imported that the component does not visibly use.
  • No font files. The type token defaults to system-ui, so copied components render correctly before you make any typographic decision.

What you get

Twelve components, each with the states you actually need rather than the exhaustive matrix:

  • Actions and status — Button, Badge
  • Forms — Input, Textarea, Select, Checkbox, Radio, Switch
  • Structure — Card, Table, Tabs
  • Overlays — Dialog

The visual argument

The system is deliberately boxy. Every corner in the library is square, and that is enforced by a single token, --fr-radius, set to 0. Edges are defined by 1px rules rather than shadows, because a rule is a structural element and a shadow is decoration. There is exactly one shadow in the system and it has no blur.

Type is whatever face you point --fr-font-sans at. The scale is drawn to stay legible at 11px, which is where the uppercase micro-label lives — used inside badges, and nowhere it would have to fight a heading for attention.

Where to go next