Overview
Company Logo renders supplier and organization logos with automatic fallback to colored initials when no image is provided. Colors are deterministically generated from the company name for consistency.Usage
With Image
src is provided, it renders an image. Otherwise, it shows initials.
Sizes
sm— 28px (inline with text, compact lists)md— 36px (default, list rows)lg— 48px (cards, profile headers)xl— 64px (organization pages, onboarding)
Shapes
Initials & Colors
Initials are automatically extracted from the company name:- “PharmaCorp Ltd” → “PC”
- “Axmed” → “AX”
- “Global Health Partners” → “GH”
Supplier List Row
Order Card
Props
Company/supplier name — used to derive initials and fallback color
Optional logo image URL. When provided, renders an image instead of initials.
Size preset:
sm: 28pxmd: 36px (default)lg: 48pxxl: 64px
Shape of the avatar
Additional class name
Inline styles
Best Practices
Use
size="md" for list rows and table cellsUse
size="lg" or size="xl" for profile pages and onboardingKeep
shape="square" for company logos — it’s more professionalLet the component generate initials automatically — don’t override
Accessibility
- Uses
role="img"witharia-label={name}for initials - Image variant uses proper
alttext - Colors meet WCAG AA contrast requirements