BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/octane/avatar

Avatar

octane/avatar
FreeComponent

octane publishes no description for this item.

Live preview

live · rendered by the registry
Rendered by octane on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/avatar.json

Source

ui/avatar.tsrxraw.githubusercontent.com/octanejs/octane/main/packages/shadcn/registry/avatar.json
1// Base UI base avatar — runs on @octanejs/base-ui's Avatar (Root/Image/Fallback), a direct
2// one-to-one mapping with the radix base.
3//
4// `AvatarBadge`, `AvatarGroup` and `AvatarGroupCount` are plain host elements in every base —
5// upstream defines no primitive for them — so they are unchanged from the radix source.
6//
7// Nothing here keys off a primitive-emitted attribute: the `data-[size=…]` variants read the
8// `data-size` this component writes itself, and the primitive emits no state attributes at all
9// (verified by rendering it — Root and Fallback are bare spans). So unlike the overlays and the
10// form controls, there is no dialect to get wrong.
11//
12// UNVERIFIED PROVENANCE: class strings come from this package's radix base rather than
13// transcribed from upstream's Base UI source.
14import { Avatar as AvatarPrimitive } from '@octanejs/base-ui/avatar';
15
16import { cn } from '@/lib/utils';
17
18type Props = { className?: string } & Record<string, unknown>;
19
20export interface AvatarProps extends Props {
21 size?: 'default' | 'sm' | 'lg';
22}
23
24export function Avatar({ className, size = 'default', ...props }: AvatarProps) @{
25 <AvatarPrimitive.Root
26 data-slot="avatar"
27 data-size={size}
28 className={cn(
29 'group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten',
30 className,
31 )}
32 {...props}
33 />
34}
35
36export function AvatarImage({ className, ...props }: Props) @{
37 <AvatarPrimitive.Image
38 data-slot="avatar-image"
39 className={cn('aspect-square size-full rounded-full object-cover', className)}
40 {...props}
41 />
42}
43
44export function AvatarFallback({ className, ...props }: Props) @{
45 <AvatarPrimitive.Fallback
46 data-slot="avatar-fallback"
47 className={cn(
48 'flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs',
49 className,
50 )}
51 {...props}
52 />
53}
54
55export function AvatarBadge({ className, ...props }: Props) @{
56 <span
57 data-slot="avatar-badge"
58 className={cn(
59 'absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full bg-primary text-primary-foreground bg-blend-color ring-2 ring-background select-none',
60 'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden',
61// … truncated

What it pulls in

npm packages

  • @octanejs/base-ui@0.1.35

Other registry items

  • @octane/utils

Files it writes

  • ui/avatar.tsrx

Facts

Registry
octane
Type
registry:ui
Access
Free
Files written
1
Licence
MIT
In the index
at or before 2026-08-07
Last confirmed
yesterday

Go to the source

Docs on octane octanejs.dev octanejs/octane on GitHub Raw registry item This item as JSON

More from octane

All 44 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
AccordionaccordionoctaneComponentsFree2 deps
AlertalertoctaneComponentsFree1 dep
Alert Dialogalert-dialogoctaneComponentsFree1 dep
Aspect Ratioaspect-ratiooctaneComponentsFreeno deps
BadgebadgeoctaneComponentsFree1 dep
BreadcrumbbreadcrumboctaneComponentsFree1 dep
ButtonbuttonoctaneComponentsFree2 deps
CardcardoctaneComponentsFreeno deps

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex