Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Logo for Astro

Astro brand containers with optional home-page links.

Logognosticui

Installation

bunx --bun shadcn@latest add @gnostic/logo

Usage

import { Logo, LogoImage, LogoText } from "@/components/ui/logo"
import logo from "@/assets/logo.svg"
<Logo>
  <LogoImage src={logo} alt="Logo" />
  <LogoText>gnosticai UI</LogoText>
</Logo>

For theme-specific marks, pass both sources on src.

<Logo href="/">
  <LogoImage src={{ light: logoLight, dark: logoDark }} alt="Logo" />
  <LogoText>gnosticai UI</LogoText>
</Logo>

Notes

  • Logo becomes an anchor automatically when you pass href.
  • LogoImage is optional, which makes text-only marks straightforward.
  • Use src for a single logo. Pass { light, dark } when the mark changes by theme.
  • Use Logo for compact brand marks and site headers, not for general-purpose hero artwork.

Examples

Adjust the container width to see the logo image and text respond to the container width.

The Logo accepts a default slot, where you can pass an SVG component.

Gnostic AI gnosticui

API Reference

LogoImageProps

PropType
src?| ImageMetadata | { light: ImageMetadata dark: ImageMetadata }

One image for both modes, or a light and dark pair.

Type| ImageMetadata | { light: ImageMetadata dark: ImageMetadata }

Place a symbol, wordmark, or text inside Logo. Set href when it should act as a link. Keep the brand mark separate from navigation so it can be reused in headers and footers.

Keyboard and behavior

A linked image needs an accessible name for its destination. If the wordmark is also visible text, avoid announcing the name twice. Use a normal anchor for home navigation.

Theme and layout

Check the mark on light, dark, and tinted surfaces. Prefer artwork with an intentional dark-mode treatment instead of applying a filter that changes brand colors unpredictably.