Skip to content

Typography

Styles for headings, paragraphs, lists…etc

h1Large

h1

h2

h3

h4

p

Blockquote

Table

List

Lead

Large

Small

Muted

Custom font family

By default Shadcn UI uses Geist as default font family. To change it, add the local font to your project, for example in the /fonts directory. Then update your pubspec.yaml with something like this:

flutter:
fonts:
- family: UbuntuMono
fonts:
- asset: fonts/UbuntuMono-Regular.ttf
- asset: fonts/UbuntuMono-Italic.ttf
style: italic
- asset: fonts/UbuntuMono-Bold.ttf
weight: 700
- asset: fonts/UbuntuMono-BoldItalic.ttf
weight: 700
style: italic

Then in your ShadApp update the ShadTextTheme:

return ShadApp(
debugShowCheckedModeBanner: false,
themeMode: themeMode,
routes: routes,
theme: ShadThemeData(
brightness: Brightness.light,
colorScheme: const ShadZincColorScheme.light(),
textTheme: ShadTextTheme(
colorScheme: const ShadZincColorScheme.light(),
family: 'UbuntuMono',
),
),
...
);

Google font

Install the google_fonts package. Then add the google font to your ShadApp:

return ShadApp(
debugShowCheckedModeBanner: false,
themeMode: themeMode,
routes: routes,
theme: ShadThemeData(
brightness: Brightness.light,
colorScheme: const ShadZincColorScheme.light(),
textTheme: ShadTextTheme.fromGoogleFont(
GoogleFonts.poppins,
colorScheme: const ShadZincColorScheme.light(),
),
),
...
);