Installation
Install Joy UI, a library of beautifully designed React UI components.
Run one of the following commands to add Joy UI to your project:
npm
npm install @mui/joy @emotion/react @emotion/styled
yarn
yarn add @mui/joy @emotion/react @emotion/styled
Peer dependencies
Please note that react and react-dom are peer dependencies too:
"peerDependencies": {
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0"
},
Public Sans font
Joy UI is designed to use the Public Sans font by default. You may add it to your project with npm or yarn via Fontsource, or with the Google Fonts CDN.
npm
npm install @fontsource/public-sans
yarn
yarn add @fontsource/public-sans
Then you can import it in your entry point like this:
import '@fontsource/public-sans';
Google Web Fonts
To install the Public Sans font in your project using the Google Web Fonts CDN, add the following code snippet inside your project's <head />
tag:
<link
rel="stylesheet"
href="https://fonts.googleapis.com/css?family=Public+Sans&display=swap"
/>