Logo
The Logo component displays your brand logo with automatic dark mode switching.
Basic Usage
Section titled “Basic Usage”---import Logo from '@/components/ui/Logo.astro';---
<Logo /><Logo size="sm" /> <!-- 20x20 --><Logo size="md" /> <!-- 24x24 --><Logo size="lg" /> <!-- 32x32 --><Logo size="xl" /> <!-- 48x48 --><Logo size="2xl" /> <!-- 96x96 -->Variants
Section titled “Variants”<!-- Icon only --><Logo variant="logomark" />
<!-- Full logo with text --><Logo variant="full" />Force Dark Version
Section titled “Force Dark Version”For dark backgrounds where you need the light version:
<section class="bg-surface-invert"> <Logo forceDark /></section>| Prop | Type | Default | Description |
|---|---|---|---|
size | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | 'md' | Logo size |
variant | 'logomark' | 'full' | 'logomark' | Logo type |
forceDark | boolean | false | Force dark version |
Logo Files
Section titled “Logo Files”Replace the SVG files in src/assets/branding/:
| File | Purpose |
|---|---|
logomark.svg | Icon for light backgrounds |
logomark-dark.svg | Icon for dark backgrounds |
logo-full.svg | Full logo for light backgrounds |
logo-full-dark.svg | Full logo for dark backgrounds |
Automatic Switching
Section titled “Automatic Switching”The Logo component automatically switches between light and dark versions based on:
- The current theme (
.darkclass on<html>) - The
forceDarkprop for manual override
Examples
Section titled “Examples”Header Logo
Section titled “Header Logo”<header class="flex items-center justify-between"> <a href="/"> <Logo variant="full" size="lg" /> </a> <nav>...</nav></header>Footer Logo
Section titled “Footer Logo”<footer class="bg-surface-invert"> <Logo variant="full" size="xl" forceDark /></footer>Favicon
Section titled “Favicon”The logomark is also used as the favicon. Update public/favicon.svg with your icon.