{"repo":"primer/primitives","free":true,"listed":false,"github":"https://github.com/primer/primitives","clone":"git clone https://github.com/primer/primitives.git","description":"Color, typography, and spacing primitives in json.","language":"TypeScript","stars":401,"topics":["design-system","design-tokens","style-dictionary"],"license":"MIT","category":"ui-components","readme_excerpt":"Primer Primitives This repo contains values for color, spacing, and typography primitives for use with [Primer][primer], GitHub's design system. Install This repository is distributed on [npm][npm]. After [installing npm][install-npm], you can install @primer/primitives with this command. Usage Storybook Docs See Primitives documentation for more information on theming and using CSS variables. Data is served from the dist/ folder: - dist/css contains CSS files with values available as CSS variables All available imports: Note: Motion CSS imports are required for components with animations, such as Spinner from @primer/react . If you're experiencing issues with animated components appearing static, ensure you've imported the motion CSS files. Note: Spacing tokens provide a unified semantic scale for gap , padding , and margin . Import functional/spacing/space.css to use --space- tokens in your components. Design token data Design token data is stored in the src/tokens directory. These tokens are compiled with style dictionary in scripts/buildTokens.ts. To make working with tokens easier, we added some additional functionality on top of what style dictionary comes with: Extending and Overwriting We have two main color modes: light and dark . Additionally we have specific accessibility modes based on those, such as light high contrast . We added a way to create a mode by only including the changes from the main mode. We call this overrides . Overrides are created in src/tokens/f","default_branch":null,"files":null,"tree":[],"storefront":"/r/primer","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/primer/primitives/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}