mirror of
https://github.com/zooai/design.git
synced 2026-10-30 14:50:04 +00:00
Monochrome, dark by default. One hue rendered through an opacity ladder. Tokens (color, type, spacing, radius, elevation, motion) + core/forms/navigation/ overlays components + brand guidelines + ui kit. The single source of truth for every Zoo surface — loadable and editable.
16 lines
874 B
React
16 lines
874 B
React
import React from 'react'
|
|
|
|
export function Avatar({ size = 32, style, children, ...rest }) {
|
|
return (
|
|
<span style={{position:'relative',display:'inline-flex',alignItems:'center',justifyContent:'center',width:size,height:size,flexShrink:0,borderRadius:'var(--radius-full)',overflow:'hidden',border:'1px solid var(--border-hairline)',background:'linear-gradient(to bottom right,var(--neutral-700),var(--neutral-900))',...style}} {...rest}>
|
|
{children}
|
|
</span>
|
|
)
|
|
}
|
|
export function AvatarImage({ src, alt = '', style, ...rest }) {
|
|
return <img src={src} alt={alt} style={{width:'100%',height:'100%',objectFit:'cover',...style}} {...rest} />
|
|
}
|
|
export function AvatarFallback({ style, children, ...rest }) {
|
|
return <span style={{fontSize:'var(--text-xs)',fontWeight:'var(--weight-medium)',color:'var(--text-secondary)',...style}} {...rest}>{children}</span>
|
|
}
|