freeCodeCamp's component library is a collection of reusable React components that can be used in your projects. The components are built with accessibility in mind and are designed to be easy to use and customize.
- Run the following command to install the library:
pnpm install @freecodecamp/ui
- Import the library's base stylesheet into your app:
// app.tsx
import '@freecodecamp/ui/dist/base.css';
import './my-app.css'; // Your custom stylesheet should be imported after, in order to override the base.
- Add either the
light-palette
ordark-palette
class to thebody
element to enable theming:
<body class="light-palette"></body>
To see the components in action, check out the Storybook.