Logo
The brand mark: an SVG spark on a squircle, crisp from 16px to a lockup.
vue
<script setup lang="ts">
import SaLogo from '@shared/components/common/SaLogo.vue'
</script>
<template>
<div class="flex items-center gap-3">
<SaLogo />
<span class="text-lg font-semibold">Smart Admin</span>
</div>
</template>Usage
One prop: size, a Tailwind size utility. It defaults to size-8.
The squircle is drawn in currentColor under text-primary, so the mark follows the theme live: re-color the app and the logo goes with it. The spark is --primary-foreground, the token guaranteed to read on the primary, so contrast holds in both color modes with no hardcoded white.
public/favicon.svg is the same shape as a static file in the default primary, because browser chrome cannot read the app's runtime color.
Examples
Sizes
vue
<script setup lang="ts">
import SaLogo from '@shared/components/common/SaLogo.vue'
</script>
<template>
<div class="flex items-end gap-4">
<SaLogo size="size-4" />
<SaLogo size="size-6" />
<SaLogo size="size-8" />
<SaLogo size="size-12" />
<SaLogo size="size-16" />
</div>
</template>A different color
The mark takes currentColor, so a text color class re-colors it.
vue
<script setup lang="ts">
import SaLogo from '@shared/components/common/SaLogo.vue'
</script>
<template>
<div class="flex items-center gap-4">
<SaLogo size="size-10" />
<SaLogo size="size-10" class="text-emerald-600" />
<SaLogo size="size-10" class="text-violet-600" />
<SaLogo size="size-10" class="text-foreground" />
</div>
</template>API
Source: src/shared/components/common/SaLogo.vue
Props
| Prop | Type | Default | Description |
|---|---|---|---|
size | string | 'size-8' | A Tailwind size utility for the square mark. |
Emits
None.
Slots
None.
Accessibility
- The SVG is
role="img"named "Smart Admin", so it is announced as the brand rather than skipped or read as a path. - It is
shrink-0, so it keeps its size in a flex row no matter what is beside it.