I want to use some fonts, but I'm having difficulties to find information/documentation about how to import etc.
I am using a styled component library: Next.UI.
In my index.js I am creating a theme and I use it in my React application. That theme already works, but there is also a property for fonts.
Can someone give me an example of using different fonts? And how do I know what fonts are supported? Or how can I import fonts?
Thanks in advance!
Here's my code for now:
import { createTheme, NextUIProvider, styled } from '@nextui-org/react';
const theme = createTheme({
type: "light",
theme: {
colors: {...},
fonts: {
sans: 'Comic Sans MS',
mono: 'Andale Mono',
serif: 'Gilda Display ',
},
}
});
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<NextUIProvider theme={theme}>
<App />
</NextUIProvider>
);