Rhythm and Harmony
UI Foundations Kit uses a typographic scale that is based on the golden ratio. This scale is used to create harmonious and visually appealing typography automatically. This is based off recommendations by Inter’s Dynamic Metrics. This is how theTypography
component is customized to work:
theme.tsx
<Typography />
component, so you don’t have to worry about it.
Styled System fontSize
s
UI Foundations Kit also adds the sm
, md
, lg
, etc. fontSize
modifiers from libraries like Styled System and Tailwind. In addition to defining styles using the sx
prop, you can pass in a string modifier like fontSize="lg"
to adjust the font size of text in a component.
Fonts
By default, UI Foundations Kit uses theInter
font family for all text. This font is a modern sans-serif typeface that is designed for legibility and readability on screens. It is also open-source and free to use in your projects.
The vite-ts/src/context/ThemeCustomizationProvider.tsx
has a series of fonts that are held in state as well. There are 4 fonts installed via Google Fonts for starters.
- Inter
- Roboto
- Ubuntu
- Manrope
vite-ts/index.html
file.
activeFont
for use via the theme switcher. If you are not interested in the theme switcher, it can be removed in favor of a sole default.
theme.ts