Components
BaseAppLogo
The logo of the product in its full, large, mark and mono variants, for light and dark themes, from three SVG files.
Example
Replace the logo
The logo is three SVG files in assets/logo/: logo.svg (full), logo-large.svg (the wide version with the name) and mark.svg (the symbol alone). The component inlines them, so one file covers the light theme, the dark theme and the single-colour version:
- Paint the main shapes with
currentColor. They take the ink colour of the theme. - Paint the accent with
var(--app-logo-accent). Inlogo-large.svg, a second accent for the text can usevar(--app-logo-accent-text), which is lighter in dark mode so it keeps its contrast. - With
mono, both accents take the ink colour too.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 48">
<path d="…" fill="currentColor" />
<circle cx="…" cy="…" r="8" style="fill: var(--app-logo-accent, #C9431F)" />
</svg>
The colours live in LOGO_COLORS in config/brand.config.ts, one set for light and one for dark. Give the root a viewBox: the component reads the width from it, and drops width, height and <title>. Ids inside the file (a mask, a gradient) are made unique per logo, so several logos can share a page.
A logo with fixed colours also works: leave its colours as they are and it renders the same in every theme.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
name | string | — | Renders the name as a text wordmark in the heading font instead of the SVG logo. Landings with their own brand use it. |
alt | string | — | The accessible name of the logo, usually the product name. |
is-dark | boolean | false | Uses the dark colours of LOGO_COLORS (light ink), whatever the theme. |
variant | "full" | "mark" | "large" | "full" | full, large or mark (the symbol alone). |
height | number | 38 | The height in pixels. |
mono | boolean | false | A single-colour version without the accent dot, for coloured backgrounds. It follows the theme like the others: dark ink in light, cream in dark. On a saturated colour such as primary, add is-dark (or wrap it in v-theme-provider theme="dark", as the login panel does) to get the light version. |
Pass alt with the product name; AppBrand does it with the brand name (BRAND_NAME, or NUXT_PUBLIC_APP_NAME when set).