Avatar
Installation
npx shadcn@latest add https://ui.timkit.cn/r/avatar.json
Usage
import { Avatar } from "@/components/ui/avatar"
Examples
Avatar · Image + fallback
Loading preview...
Avatar · Fallback only
Loading preview...
Avatar · Fallback only
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Interactive State
Loading preview...
Avatar · Interactive State
Loading preview...
Avatar · Interactive State
Loading preview...
Avatar · Profile Pattern
Loading preview...
Structured API
Component
avatar
Logic
zag / avatar
Runtime Frameworks
ReactVueWeappHTML
Supported Platforms
WebWeChat Mini Program
Configuration
| Prop | Type | Default | Description |
|---|---|---|---|
| logic.provider* | enum (zag | native | none) | zag | State and interaction provider used by this component. |
| logic.machine | string | avatar | Underlying state machine identifier when provider is zag. |
| platforms* | array | Web, WeChat Mini Program | Platforms officially supported by this schema. |
| frameworks* | array | React, Vue, Weapp, HTML | Framework demos/code currently available in registry files. |
| dependencies | array | @timui/core, @zag-js/react | Runtime package dependencies required by this registry item. |
| optionalPeerDependencies | array | - | Optional peer dependencies used by this registry item. |
| registryDependencies | array | use-machine | Dependent Timkit registry components/hook entries. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | - | The source URL of the avatar image. |
| alt | string | - | The alt text for the avatar image. |
Slots
| Prop | Type | Default | Description |
|---|---|---|---|
| default | slot | - | Default slot content rendered inside the component root. |
Parts
| Prop | Type | Default | Description |
|---|---|---|---|
| root* | root | - | The avatar container |
| image | part | - | The avatar image |
| fallback | part | - | The fallback element |
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.
Extended notes are not available for this component yet.
On This Page
- Installation
- Usage
- Examples
- Avatar · Image + fallback
- Avatar · Fallback only
- Avatar · Fallback only
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Interactive State
- Avatar · Interactive State
- Avatar · Interactive State
- Avatar · Profile Pattern
- API Reference
Avatar
Installation
npx shadcn@latest add https://ui.timkit.cn/r/avatar.json
Usage
import { Avatar } from "@/components/ui/avatar"
Examples
Avatar · Image + fallback
Loading preview...
Avatar · Fallback only
Loading preview...
Avatar · Fallback only
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Image + fallback
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Profile Pattern
Loading preview...
Avatar · Interactive State
Loading preview...
Avatar · Interactive State
Loading preview...
Avatar · Interactive State
Loading preview...
Avatar · Profile Pattern
Loading preview...
Structured API
Component
avatar
Logic
zag / avatar
Runtime Frameworks
ReactVueWeappHTML
Supported Platforms
WebWeChat Mini Program
Configuration
| Prop | Type | Default | Description |
|---|---|---|---|
| logic.provider* | enum (zag | native | none) | zag | State and interaction provider used by this component. |
| logic.machine | string | avatar | Underlying state machine identifier when provider is zag. |
| platforms* | array | Web, WeChat Mini Program | Platforms officially supported by this schema. |
| frameworks* | array | React, Vue, Weapp, HTML | Framework demos/code currently available in registry files. |
| dependencies | array | @timui/core, @zag-js/react | Runtime package dependencies required by this registry item. |
| optionalPeerDependencies | array | - | Optional peer dependencies used by this registry item. |
| registryDependencies | array | use-machine | Dependent Timkit registry components/hook entries. |
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| src | string | - | The source URL of the avatar image. |
| alt | string | - | The alt text for the avatar image. |
Slots
| Prop | Type | Default | Description |
|---|---|---|---|
| default | slot | - | Default slot content rendered inside the component root. |
Parts
| Prop | Type | Default | Description |
|---|---|---|---|
| root* | root | - | The avatar container |
| image | part | - | The avatar image |
| fallback | part | - | The fallback element |
This API reference is generated from `/packages/core` component schemas to keep React/Vue/Weapp docs consistent.
Extended notes are not available for this component yet.
On This Page
- Installation
- Usage
- Examples
- Avatar · Image + fallback
- Avatar · Fallback only
- Avatar · Fallback only
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Image + fallback
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Profile Pattern
- Avatar · Interactive State
- Avatar · Interactive State
- Avatar · Interactive State
- Avatar · Profile Pattern
- API Reference