Getting StartedInstallation and setup guides 5
LayoutWorkflow and structural layout components 7
OverlayModal and floating layer surfaces 3
FeedbackStatus, empty, progress, and loading placeholder patterns 5
FormInput and selection components 17
UtilityGeneral-purpose interface utilities 7
NavigationMenu surfaces and hierarchical actions 7

Styling contract

Style the wrapper through the stable attributes on the rendered avatar shell and slot nodes, rather than depending on extra local classes on <tng-avatar> itself.

Wrapper state hooks

AttributeValuesUsage
data-shapecircle | squareControls shell geometry on the internal .tng-avatar element.
data-sizesm | md | lgControls wrapper dimensions and fallback text scale.
data-slotavatar | avatar-image | avatar-fallbackTargets shell, image, and fallback nodes.
hiddenApplied to image or fallbackReflects which visual layer is currently active.

Wrapper shell

  • :host is inline-flex, so surrounding spacing still belongs to the parent layout.
  • The internal shell is .tng-avatar and carries data-size and data-shape.
  • The wrapper already manages [hidden] on image and fallback slots when sources change.

Owner guidance

Override the wrapper by targeting the internal shell under tng-avatar. If you need custom host structure or owner-managed fallback visibility, move to the headless Avatar page.

avatar.contract.css

css
tng-avatar > .tng-avatar[data-size="lg"] {
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tng-semantic-accent-brand) 12%, transparent);
}

tng-avatar > .tng-avatar[data-shape="square"] {
  border-radius: 1rem;
}

tng-avatar > .tng-avatar [data-slot="avatar-fallback"] {
  background: color-mix(in srgb, var(--tng-semantic-accent-brand) 10%, transparent);
}