Avatar group preview
Profile photos, presence indicators and teammate selection.
pro · Essentials · primitive
When to use
- Use it when a product interface needs profile photos, presence indicators and teammate selection.
- Choose it when the host application can supply the required state and keep business logic outside the presentation component.
Alternatives
- Choose tidal-button instead when press, loading, success and disabled states is the actual interface need, rather than avatar group.
Configure components.json and the @tidal-pro namespace before installing Pro components.
Installation
npx shadcn@latest add @tidal-pro/avatarImport components/ui/tidal.css, components/ui/avatar.css. Wrap installed components in tidal-scope.
Preview
Minimal example
import"./components/ui/tidal.css";
import"./components/ui/avatar.css";
import{TidalAvatar}from"./components/ui/avatar";
export default()=><div className="tidal-scope"><TidalAvatar name={"Demo"}/></div>;API and props
TidalAvatarGroup.label (required)stringRequired label value accepted by this exported component.
TidalAvatarGroup.members (required)Array<TidalAvatarMember>Required members value accepted by this exported component.
TidalAvatarGroup.classNamestring | undefinedOptional class name value accepted by this exported component.
TidalAvatarGroup.dir"ltr" | "rtl" | undefinedOptional dir value accepted by this exported component.
TidalAvatarGroup.namestring | undefinedOptional name value accepted by this exported component.
TidalAvatarGroup.onSelect((id: string) => void) | undefinedCallback invoked when the select interaction is proposed.
TidalAvatarGroup.requiredboolean | undefinedOptional required value accepted by this exported component.
TidalAvatarGroup.selectedIdstring | undefinedOptional selected id value accepted by this exported component.
TidalAvatarGroup.theme"light" | "dark" | undefinedOptional theme value accepted by this exported component.
TidalAvatar.name (required)stringRequired name value accepted by this exported component.
TidalAvatar.decorativeboolean | undefinedUse inside a control that already carries the person's accessible name.
TidalAvatar.presenceTidalPresence | undefinedOptional presence value accepted by this exported component.
TidalAvatar.selectedboolean | undefinedOptional selected value accepted by this exported component.
TidalAvatar.shape"circle" | "rounded" | undefinedOptional shape value accepted by this exported component.
TidalAvatar.size"sm" | "md" | "lg" | undefinedOptional size value accepted by this exported component.
TidalAvatar.srcstring | undefinedOptional src value accepted by this exported component.
Complete usage
Full example, stylesheet imports, API and accessibility documentation
Gotchas
- The host application owns data, validation, persistence, navigation, and service side effects described by this API.