Fonts
Vectis UI uses system fonts by default and does not load web fonts. Override the font-family tokens to use your own fonts.
Default font families
--vectis-font-family-sans: System font stack for interface text.--vectis-font-family-display: Heading font. Defaults tovar(--vectis-font-family-sans).--vectis-font-family-mono: System monospace stack for code.
Components use three semantic tokens: --vectis-text-family, --vectis-text-family-heading and --vectis-text-family-code. Override these on a container to change fonts in one section; primitive aliases declared at the root do not resolve again in that container.
Load a web font
Load the font, then assign its CSS family name to the matching tokens. These examples set the body and heading fonts for the whole page.
/* Your own stylesheet, in no layer. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
:root {
--vectis-font-family-sans: 'Inter', system-ui, sans-serif;
--vectis-font-family-display: 'Inter', system-ui, sans-serif;
}To serve the font from your own application, declare its file with @font-face:
/* Your own stylesheet, in no layer. The files are served from your origin. */
@font-face {
font-family: 'Inter';
src: url('/fonts/inter-variable.woff2') format('woff2-variations');
font-weight: 400 700;
font-display: swap;
}
:root {
--vectis-font-family-sans: 'Inter', system-ui, sans-serif;
--vectis-font-family-display: 'Inter', system-ui, sans-serif;
}Font roles
VTypography selects its font family from its variant:
--vectis-text-family-heading:displayandheading-1throughheading-4.--vectis-text-family: Body text, subtitles, labels, captions and overlines.--vectis-text-family-code: Thecodevariant. Also used byVInputOTP.
Optional icon font
Built-in SVG icons do not need a font. For ligature icons, load a font and set --vectis-font-family-icon, which defaults to Material Symbols Rounded. See Iconography for icon imports and resolvers.