Typography
Text is set in Public Sans and code and numbers in DM Mono; component body text is 14px (text-sm).
Public Sans · DM Mono zubazar/ui · free (MIT)
Headings
h1–h6 take only their color and a slight negative letter spacing; set the size with text-* and the weight with font-*.
<div class="space-y-4">
<p class="text-4xl font-bold tracking-tight">Monthly sales · 4xl / 40px</p>
<p class="text-3xl font-bold tracking-tight">Monthly sales · 3xl / 32px</p>
<h1 class="text-2xl font-semibold">Page title · 2xl / 26px</h1>
<h2 class="text-xl font-semibold">Section title · xl / 21px</h2>
<h3 class="text-lg font-semibold">Subsection · lg / 18px</h3>
<h4 class="text-base font-semibold">Card title (large) · base / 16px</h4>
<h5 class="text-sm font-semibold">Card title · sm / 14px</h5>
<h6 class="text-xs font-semibold tracking-wide text-muted uppercase">Section label · xs / 12px</h6>
</div>
| Prop | Values |
|---|---|
text-* | 2xl (page) | xl (section) | lg | base | sm (card) |
font-* | semibold (headings) | bold (large numbers and display text) |
Text sizes
Each text-* size comes with its own line height, so no leading-* is needed.
<div class="space-y-3">
<p class="text-base">Lead text (base / 16px). The panel lets teams manage orders, follow shipments and track reports.</p>
<p class="text-sm">Body text (sm / 14px). Tables, forms and card content use this size.</p>
<p class="text-xs text-muted">Help text (xs / 12px). Descriptions below fields.</p>
<p class="text-2xs font-semibold tracking-wider text-muted uppercase">Small label (2xs / 11px)</p>
</div>
| Prop | Values |
|---|---|
text-* | 2xs | xs | sm | base | lg | xl | 2xl | 3xl | 4xl |
Weights
Body text uses font-normal, prominent values and labels font-medium, headings font-semibold and large numbers font-bold.
<div class="space-y-1 text-lg">
<p class="font-normal">Regular 400 · Customer record</p>
<p class="font-medium">Medium 500 · Customer record</p>
<p class="font-semibold">Semibold 600 · Customer record</p>
<p class="font-bold">Bold 700 · Customer record</p>
</div>
| Prop | Values |
|---|---|
font-* | normal | medium | semibold | bold |
Numbers and code
Use tabular-nums for digits stacked in columns and font-mono for values such as codes and order numbers.
<div class="space-y-2">
<p class="text-2xl font-semibold tabular-nums">1,248 · 3,106 · 96</p>
<p class="font-mono text-sm">ORD-1042 · 2026-10-07</p>
<p class="text-sm">Inline <code class="rounded-sm bg-sunken px-1.5 py-0.5 text-[0.85em] text-ink">zb:table</code>, a <a href="#" class="font-medium text-primary-ink hover:underline">link</a>, <strong>bold</strong> and <em>italic</em>.</p>
</div>
| Prop | Values |
|---|---|
tabular-nums | Equal-width digits |
font-mono | DM Mono |
Changing the font
To change the font, set --zb-font-sans, --zb-font-mono, --zb-font-display (headings) or --zb-font-brand again in your app's CSS.
/* resources/css/app.css, after the @import lines */
@layer base {
:root, [data-theme] {
--zb-font-brand: 'Poppins', ui-sans-serif, system-ui, sans-serif;
}
}
| Prop | Values |
|---|---|
--zb-font-sans · --zb-font-mono · --zb-font-display · --zb-font-brand | Font family values |
Props
The values the component takes. What are props and slots?
| Prop | Type | Default | Description |
|---|---|---|---|
font-sans | — | Public Sans | All text |
font-mono | — | DM Mono | code, kbd, pre, numeric labels |
font-brand | — | Public Sans | Brand name next to the logo |
text-2xs | — | 11px / 16px | Small uppercase labels, table headers |
text-xs | — | 12px / 18px | Help text, badges |
text-sm | — | 14px / 22px | Body text, forms and tables |
text-base | — | 16px / 24px | Lead text, large card titles |
text-lg | — | 18px / 26px | Subsection titles |
text-xl | — | 21px / 28px | Section titles |
text-2xl | — | 26px / 34px | Page titles |
text-3xl | — | 32px / 40px | Display headings |
text-4xl | — | 40px / 48px | Large display headings |
Installation
The fonts are downloaded at build time by the fonts setting in vite.config.js; add @zubazarFonts to the layout's head slot. Details: Fonts.
{{-- In the head slot of the zb:layout.* components --}}
<zb:slot:head>
@zubazarFonts(['public-sans', 'dm-mono'])
@vite(['resources/css/app.css', 'resources/js/app.js'])
</zb:slot:head>
Advanced
Brand type
In layouts, the app name next to the logo is set with font-brand. It defaults to Public Sans; if your app uses a separate font for its brand name, change only --zb-font-brand.
<span class="font-brand text-[15px] font-bold tracking-tight text-ink">Acme</span>
| Prop | Values |
|---|---|
font-brand | Brand type family (default: Public Sans) |
Developer notes
- Both fonts are under the SIL Open Font License.
- Heading tags take the
text-inkcolor and -0.011em letter spacing by themselves; the size mapping in the example is used throughout the panel. - Table, form and card content uses
text-sm, field descriptionstext-xs, and small uppercase labels such as table headerstext-2xs. - The recommended font load includes these four weights of Public Sans.
- The
code,kbdandpretags use DM Mono by themselves. - A color theme can bring its own font too.