# @fabiocv/ui > The components and tokens behind fabio.cv. A React 19 package of finished components, the primitives they are built on, and the tokens that hold every design decision. Install it with `npm install @fabiocv/ui`, import `@fabiocv/ui/styles.css` once, then each component from its own path, such as `@fabiocv/ui/button`. Read Setup and Brand before writing code, Interaction before building a control, then the guide of each thing you use. A guide has the rules, the reasons for them, the examples and the types. What it says wins over what similar libraries do. The principles: - **Few decisions.** One family, one size and two smaller ones in menus and small controls, one ground, four inks and one accent. Before adding anything, check whether an existing decision already answers it. Two values that are nearly the same are noise: they make type and the grid harder to read. - **Hierarchy comes from weight and ink.** Never from a new colour, and from size only in menus and small controls. - **Everything sits on the system.** Widths are whole grid columns, and vertical space is built from the 24px line. - **Use a token.** Do not hard-code a value that a token covers. A token is a CSS variable, so the inspector shows the decision by its name. - **Ask.** If these pages do not answer a design question, ask the person rather than invent an answer. ## Start here - [Setup](https://ui.fabio.cv/setup/index.md): How to install the package and set an app up, with Next.js and Vite examples, and how to style beside it. Read it before writing any code. - [Brand](https://ui.fabio.cv/brand/index.md): The principles behind every decision, and when a new token is allowed. Read it before designing anything. - [Interaction](https://ui.fabio.cv/interaction/index.md): What hover, press, focus, touch, popups and links do everywhere. Read it before building a control that is not in the package, or changing one that is. - [Structure](https://ui.fabio.cv/structure/index.md): Which tier a piece of UI belongs to, and what it is named after. Read it before adding a component. ## Foundations - [Color](https://ui.fabio.cv/color/index.md): Which surface, ink or accent a job takes, with every token's value and contrast in light and dark. - [Typography](https://ui.fabio.cv/typography/index.md): Which size, weight and ink a piece of text takes. One family and one size, with smaller ones inside menus and tooltips. - [Spacing](https://ui.fabio.cv/spacing/index.md): How far apart things sit. The spacing scale and what each step is for. - [Radius](https://ui.fabio.cv/radius/index.md): Which corner a shape takes, and how a shape inside another keeps its corner concentric. - [Shadow](https://ui.fabio.cv/shadow/index.md): Whether a thing casts a shadow. Almost nothing does. - [Opacity](https://ui.fabio.cv/opacity/index.md): How a modal dims the page in light and dark. The only opacity tokens in the system. - [Breakpoints](https://ui.fabio.cv/breakpoints/index.md): What changes between mobile, tablet and desktop, plus the container widths. - [Grid](https://ui.fabio.cv/grid/index.md): The 24-column grid. How to work out a span, how to lay a page out on it, and which columns each block takes. - [Motion](https://ui.fabio.cv/motion/index.md): Which spring a movement takes, what it moves, and what reduced motion leaves. Covers `@fabiocv/ui/spring`. Read it before animating anything. - [Sound](https://ui.fabio.cv/sound/index.md): Interaction sounds, synthesised. Use it to give a page's clicks and menus a sound. - [Tokens](https://ui.fabio.cv/tokens/index.md): The tokens in TypeScript. Use it to style anything of your own in Vanilla Extract or a React `style`. ## Primitives - [Cutout](https://ui.fabio.cv/cutout/index.md): A surface with shapes cut out of it, with a gap, concentric corners and fillets. Use it to set a part into a surface, or to make a hole that moves. - [Highlight](https://ui.fabio.cv/highlight/index.md): One hover background that slides between the items of a list. Use it for a list, a row or a control of your own that the pointer passes over. ## Components - [Badge](https://ui.fabio.cv/badge/index.md): A short word that marks the text before it, such as Soon. Use it for a state, beside a label. - [Button](https://ui.fabio.cv/button/index.md): A quiet button with an optional icon on either side, which is a link when it has an `href`. Use it for every action and every link that stands alone. - [Drawer](https://ui.fabio.cv/drawer/index.md): A sheet that rises over the page, which steps back behind it. Use it for a modal, or a page opened over another. - [Flip Name](https://ui.fabio.cv/flip-name/index.md): A name whose letters are cubes that turn under the pointer. Use it for a name or a wordmark. - [Flow Gradient](https://ui.fabio.cv/flow-gradient/index.md): An animated gradient behind the page, in WebGL. Use it as a page's background. - [Icons](https://ui.fabio.cv/icons/index.md): The set of line icons and how they are drawn. Use it for every icon, and as the rules for drawing another. - [Image Card](https://ui.fabio.cv/image-card/index.md): A picture or a film with a tag, a title and an expand button cut into it on hover. Use it for a project's thumbnail. - [Menu](https://ui.fabio.cv/menu/index.md): A menu from a list of options: items, links, submenus, checkboxes, radios, toggles and groups. Use it for any list of choices that opens from a button. - [Switch](https://ui.fabio.cv/switch/index.md): A setting that is on or off, with its label. Use it for a setting, with its name beside it. - [Tag](https://ui.fabio.cv/tag/index.md): Text in a button's box, with an action at its end such as copying it. Use it for a value that is not a link. - [Toggle](https://ui.fabio.cv/toggle/index.md): A button that stays pressed. Use it for one thing that is on or off and shows its own state, such as sound. - [Toggle Group](https://ui.fabio.cv/toggle-group/index.md): A row of toggles with one always pressed. Use it to choose one of a few options that all stay in view. - [Tooltip](https://ui.fabio.cv/tooltip/index.md): One line of text that follows the pointer. Use it to name or explain what the pointer is on. ## Utilities - [Theme](https://ui.fabio.cv/theme/index.md): Light, dark and system themes, remembered between visits. Use it when visitors can choose, or the page follows the system. - [Router](https://ui.fabio.cv/router/index.md): Moves links to the app's own pages through its router. Use it in an app with client-side navigation. - [Focus ring](https://ui.fabio.cv/focus-ring/index.md): The keyboard focus ring, for Vanilla Extract styles. Use it on every control of your own that can take focus. - [useGravity](https://ui.fabio.cv/use-gravity/index.md): Leans an element toward a nearby pointer. Use it on a mark that should feel the pointer come near. - [useShift](https://ui.fabio.cv/use-shift/index.md): A spring between 0 and 1 for an icon with two states. Use it to draw an icon that changes shape. ## Beside the package - [Component Code](https://ui.fabio.cv/component-code/index.md): A React component beside the code that makes it, with every value a control, for your Storybook and docs. - [MCP](https://ui.fabio.cv/mcp/index.md): MCP Apps that show UI in the chat: every tool in one server. - [Component Code in the chat](https://ui.fabio.cv/mcp/component-code/index.md): Code with live parameters that you can change and see the component update. - [Orbit in the chat](https://ui.fabio.cv/mcp/orbit/index.md): A one-button game to play while your agent works. Switch rings to miss the arcs ahead. ## Skills - [skills.fabio.cv](https://skills.fabio.cv/): Skills for coding agents, which specify how an interface behaves under the hand, in numbers and in any stack. Use one when the work needs behaviour this package has no component for. - [Resizable panels](https://skills.fabio.cv/skills/interaction-design/resizable-panels/SKILL.md): A split view, a draggable divider, or a sidebar that closes on drag. ## Optional - [Everything in one file](https://ui.fabio.cv/llms-full.txt): Every guide above, one after another. - [fabio.cv](https://fabio.cv/): The site the system was made for. - [Storybook](https://storybook.fabio.cv/): Every component's stories, for people.