Skip to content
P

@primer/primitives

Typography, spacing, and color primitives for Primer design system

by primer-cssFree

#343in UI Libraries
0In stores

Description

@primer/primitives contains the colour, spacing and typography values behind Primer, GitHub's design system. It is distributed on npm and pr…

Highlights

  • Colour, spacing and typography tokens
  • CSS variables for Primer's design system
  • Light, dark and high-contrast modes
  • Spacing scale for gap, padding and margin
  • Built with Style Dictionary

Ratings & Reviews

No ratings yet

Be the first to rate @primer/primitives.

People also visit

G

@gainsight-hub/design-tokens

Design tokens: CSS variables, JSON, TypeScript constants, and Tailwind preset

UI Libraries
Launch
D

design-tokens

Generate a design tokens file

AI Skills
Get
D

design-system

Token architecture, component specifications, and slide generation

AI Skills
Get
P

@primer/view-components

ViewComponents for the Primer Design System

UI Libraries
Launch
P

@primer/react

An implementation of GitHub's Primer Design System using React

UI Libraries
Launch
Z

@zuilib/tokens

ZUI — design tokens: one tokens.json

UI Libraries
Launch

@primer/primitives FAQ

What is Primer Primitives?

The colour, spacing and typography values for Primer, GitHub's design system. It is distributed on npm as @primer/primitives.

How do I use it?

Install it with npm and import the CSS files from dist/css. The values are available as CSS variables, and the README lists all the imports.

Do animated components need extra CSS?

Yes. The README says motion CSS imports are required for components with animations, such as the Spinner from @primer/react.

How are the tokens built?

Token data is kept in src/tokens and compiled with Style Dictionary through scripts/buildTokens.ts.

How do I add a colour mode?

Create an override file in the matching light or dark overrides folder, list only the changes from the main mode, and add the file to themes.config.ts.

What are the best @primer/primitives alternatives?

Popular alternatives to @primer/primitives include @gainsight-hub/design-tokens, @primer/view-components and @primer/react. See all @primer/primitives alternatives

Developer Stuff

Badges