SiAvatarBackgroundColorDirective documentation¶
selector
[siAvatarBackgroundColor]
The directive provide a CSS variable --background with a color based on the initials or alt text.
Input Properties¶
Name | Type | Default | Description |
---|---|---|---|
autoColor ¶ | boolean | false | Automatically calculates the background color. If set, color will be ignored. |
color ¶ | number | undefined | The desired color index from $element-data-* color tokens. This can be set to any kind of positive integer that is then mapped to a color index. A better way to set a pseudo-random color is to set autoColor to true . |
Attributes and Methods¶
Name | Type | Default | Description |
---|---|---|---|
calculateColorFromInitials(...) ¶ | (displayInitials: string ) => void | Update background color variable based on the initials or placeholder text. Parameters
|
Types Documentation¶
No types to document for items on this page.
Except where otherwise noted, content on this site is licensed under MIT License.