GITHUB DESIGN SYSTEM REACT · TOKENS · OCTICONS

The Primer playground.

A hands-on field guide to GitHub's design language. Explore real components, compare states, and take the code straight into your product.
80live examples
08component families
01source of truth
COMPONENT LIBRARY / BUTTONS

Buttons.

Actions, hierarchy, and states. Ten practical examples, each paired with its implementation.
/
10 / 10
01Primary actionbuttons
PREVIEW
JSXtsx
<Button variant="primary">Create repository</Button>
02Default actionbuttons
PREVIEW
JSXtsx
<Button>Open pull request</Button>
03Destructive actionbuttons
PREVIEW
JSXtsx
<Button variant="danger">Delete branch</Button>
04Quiet actionbuttons
PREVIEW
JSXtsx
<Button variant="invisible">Cancel</Button>
05Link actionbuttons
PREVIEW
JSXtsx
<Button variant="link">View documentation</Button>
06Small buttonbuttons
PREVIEW
JSXtsx
<Button size="small">Small button</Button>
07Large buttonbuttons
PREVIEW
JSXtsx
<Button size="large">Large button</Button>
08With leading iconbuttons
PREVIEW
JSXtsx
<Button leadingVisual={PlusIcon}>New issue</Button>
09With trailing countbuttons
PREVIEW
JSXtsx
<Button count={12}>Notifications</Button>
10Loading statebuttons
PREVIEW
Saving changes
JSXtsx
<Button loading loadingAnnouncement="Saving changes">Save changes</Button>
Primer is GitHub's design system.·Made for building consistent, accessible interfaces.