Files
ui/docs/content/1.getting-started/5.fonts.md
2024-11-19 10:07:01 +01:00

29 lines
842 B
Markdown

---
title: Fonts
description: 'Nuxt UI integrates with Nuxt Fonts to provide plug-and-play font optimization.'
links:
- label: 'nuxt/fonts'
to: https://github.com/nuxt/fonts
target: _blank
icon: i-simple-icons-github
---
## Usage
Nuxt UI automatically registers the [`@nuxt/fonts`](https://github.com/nuxt/fonts) module for you, so there's no additional setup required. To use a font in your Nuxt UI application, you can simply declare it in your CSS:
```css [main.css]
@import "tailwindcss";
@import "@nuxt/ui";
@theme {
--font-sans: 'Public Sans', sans-serif;
}
```
That's it! Nuxt Fonts will detect this and you should immediately see the web font loaded in your browser.
::note{to="https://fonts.nuxt.com/advanced" target="_blank"}
Read more about how `@nuxt/fonts` work behind the scenes to optimize your fonts.
::