On this page
On this page
Getting started
Install
@primer/reactand its peer dependencies:npm install @primer/react react react-dom styled-componentsWrap the root of your application with
ThemeProviderandBaseStyles:import {ThemeProvider, BaseStyles} from '@primer/react'function App() {return (<ThemeProvider><BaseStyles><div>...</div></BaseStyles></ThemeProvider>)}Import components from
@primer/reactand use them in your application:import {Button} from '@primer/react'function MyComponent() {return <Button>Click me</Button>}
More information
See the primer/react repository for more information about how to use and contribute to Primer React. For component-specific documentation, check out the React section of component guidelines (example: ActionList).