src/components/avatar/Avatar.ts:
class: Avatar, btu-avatar
Superclass
| Name | Module | Package |
|---|---|---|
LitElement | lit |
Mixins
| Name | Module | Package |
|---|---|---|
EventEmitterMixin | /src/utils/EventEmitterMixin.js | |
ReadyMixin | /src/utils/ReadyMixin.js |
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
src | string | '' | Image source URL | ||
alt | string | '' | Alt text for the image | ||
fallback | string | '' | Fallback text (typically user initials) | ||
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl' | 'md' | Size variant. - 'xs': Extra small (1.5rem) - 'sm': Small (2.25rem) - 'md': Medium (2.5rem) - default - 'lg': Large (3rem) - 'xl': Extra large (3.5rem) - 'xxl': Extra extra large (4rem) |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
btu-avatar-ready | CustomEvent | Fired after first render and initialization | |
btu-avatar-image-loaded | CustomEvent<{src: string}> | Fired when image successfully loads | |
btu-avatar-image-error | CustomEvent<{src: string, error: Event}> | Fired when image fails to load |
Attributes
| Name | Field | Inherited From |
|---|---|---|
src | src | |
alt | alt | |
fallback | fallback | |
size | size |
CSS Properties
| Name | Default | Description |
|---|---|---|
--avatar-size | Custom size (overrides size prop) | |
--avatar-bg-color | Fallback background color (default: purple-600) | |
--avatar-corner-rounding | How rounded is the avatar (default: circle) | |
--avatar-ring-color | Optional ring border color | |
--avatar-ring-width | Ring border width (default: 2px) |
Exports
| Kind | Name | Declaration | Module | Package |
|---|---|---|---|---|
js | default | Avatar | src/components/avatar/Avatar.ts | |
custom-element-definition | btu-avatar | Avatar | src/components/avatar/Avatar.ts |
src/components/avatar/AvatarGroup.ts:
class: AvatarGroup, btu-avatar-group
Superclass
| Name | Module | Package |
|---|---|---|
LitElement | lit |
Mixins
| Name | Module | Package |
|---|---|---|
EventEmitterMixin | /src/utils/EventEmitterMixin.js | |
ReadyMixin | /src/utils/ReadyMixin.js |
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
max | number | undefined | Maximum number of visible avatars. Remaining avatars shown as "+N" | |||
size | 'xs' | 'sm' | 'md' | 'md' | Size variant for all child avatars (unless individually overridden) |
Methods
| Name | Privacy | Description | Parameters | Return | Inherited From |
|---|---|---|---|---|---|
processAvatars | Process all avatar children: apply size, handle overflow Call this method when avatars are dynamically added or removed | void |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
btu-avatar-group-ready | CustomEvent | Fired after first render and initialization | |
btu-avatar-group-overflow | CustomEvent<{hidden: number}> | Fired when avatars are hidden due to max limit |
Attributes
| Name | Field | Inherited From |
|---|---|---|
max | max | |
size | size |
Exports
| Kind | Name | Declaration | Module | Package |
|---|---|---|---|---|
js | default | AvatarGroup | src/components/avatar/AvatarGroup.ts | |
custom-element-definition | btu-avatar-group | AvatarGroup | src/components/avatar/AvatarGroup.ts |
src/components/badge/Badge.ts:
class: Badge, btu-badge
Superclass
| Name | Module | Package |
|---|---|---|
LitElement | lit |
Mixins
| Name | Module | Package |
|---|---|---|
EventEmitterMixin | /src/utils/EventEmitterMixin.js | |
ReadyMixin | /src/utils/ReadyMixin.js |
Fields
| Name | Privacy | Type | Default | Description | Inherited From |
|---|---|---|---|---|---|
variant | 'info' | 'primary' | 'error' | 'success' | 'warning' | 'info' | Style of the badge. - 'info': Informational (default) - 'primary': Primary action or emphasis - 'error': Error or danger state - 'success': Success or completion state - 'warning': Warning or caution state | ||
dot | boolean | false | Should a dot be displayed before the label? | ||
size | string | 'sm' | Size variant. - 'sm': Small (default) - 'md': Medium - 'lg': Large |
Events
| Name | Type | Description | Inherited From |
|---|---|---|---|
btu-badge-ready | CustomEvent | Fired after first render and initialization |
Attributes
| Name | Field | Inherited From |
|---|---|---|
variant | variant | |
dot | dot | |
size | size |
CSS Properties
| Name | Default | Description |
|---|---|---|
--badge-color-foreground | Text color (overrides theme color) | |
--badge-color-background | Background color (overrides theme color) | |
--badge-radius-size | Border radius size (overrides shape default, default: 999px) | |
--badge-px | Horizontal padding (overrides size default) | |
--badge-py | Vertical padding (overrides size default) | |
--badge-dot-size | Size of the dot affordance (default: 6px) |
Exports
| Kind | Name | Declaration | Module | Package |
|---|---|---|---|---|
js | default | Badge | src/components/badge/Badge.ts | |
custom-element-definition | btu-badge | Badge | src/components/badge/Badge.ts |