freeCodeCamp / ui

freeCodeCamp's UI Component Library
BSD 3-Clause "New" or "Revised" License
20 stars 19 forks source link
freeCodeCamp banner

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.

Installation

pnpm install @freecodecamp/ui
// 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.
import { getThemingClass } from "@freecodecamp/ui";

const MyApp = () => {
    const cls = getThemingClass();

    return <body className={cls}></body>;
};

Docs

To see the components in action, check out the Storybook.