Skip to content

Visual

A static circular visual primitive for decorative icon and avatar cues.

Supporting primitive

Use fd-visual when a compact decorative cue helps users scan or group related content faster. The component stays intentionally narrow in v1: it owns the circular surface, size, clipping, and fallback rendering, while the surrounding interface owns the meaning.

When to use

  • Decorative icon surfaces — when you want a consistent circular cue next to a card title, list item, or grouped summary.
  • Decorative avatar framing — when you need a circular avatar placeholder or clipped image next to nearby identifying text.
  • Repeated visual grouping — when a shared size and tone system helps related content feel clearly associated.

When not to use

  • Interactive controlsfd-visual is not a button, toggle, chip, or link in v1.
  • Standalone semantic images — if the visual must carry meaning on its own, use a different pattern instead of relying on this decorative primitive.
  • Managed media APIs — if you need built-in src, alt, overlays, counters, or richer media composition, fd-visual is too narrow for that job in v1.

Examples

Decorative icon surfaces, size presets, and avatar composition. Open Storybook for slot-composition examples and individual states. View in Storybook →

Properties

NameTypeDefaultDescription
type"neutral" | "cool" | "warm" | "avatar"neutralVisual treatment for the circular surface. Use avatar when the visual should clip avatar media or render the placeholder avatar fallback.
size"xs" | "sm" | "md" | "lg" | "xl" | "2xl"mdApplies one of the fixed Figma size presets for the overall circle and its inner content.

Slots

NameDescription
(default)Optional decorative icon or avatar media. Leave empty to use the built-in fallback glyph or avatar placeholder.

Slot content is decorative in v1. Do not slot interactive controls or content that must be announced independently.

CSS custom properties

NameDefaultDescription
--fd-visual-sizePreset from sizeOverrides the rendered circle size.
--fd-visual-paddingPreset from sizeOverrides the inner padding for non-avatar variants.
--fd-visual-content-sizePreset from sizeOverrides the inner content box size for non-avatar variants.
--fd-visual-radius9999pxCorner radius for the circular surface.
--fd-visual-bg-neutrallight-dark(var(--fdic-color-neutral-300), var(--fdic-color-neutral-800))Neutral surface background. Uses a stronger neutral surface than the page background in light and dark themes.
--fd-visual-fg-neutralvar(--fdic-color-text-primary, #212123)Neutral foreground color used by the fallback glyph and slotted icon content.
--fd-visual-bg-coollight-dark(var(--fdic-color-primary-200), var(--fdic-color-primary-700))Cool surface background. Uses a lighter blue in light mode and a darker blue in dark mode.
--fd-visual-fg-coollight-dark(var(--fdic-color-primary-900), var(--fdic-color-primary-100))Cool foreground color used by the fallback glyph and slotted icon content. Switches with the surface so the glyph remains legible in light and dark themes.
--fd-visual-bg-warmlight-dark(var(--fdic-color-secondary-300), var(--fdic-color-secondary-900))Warm surface background. Uses a lighter warm surface in light mode and a softer dark warm surface in dark mode.
--fd-visual-fg-warmlight-dark(var(--fdic-color-secondary-900), var(--fdic-color-secondary-050))Warm foreground color used by the fallback glyph and slotted icon content. Switches with the surface so the glyph remains legible in light and dark themes.
--fd-visual-bg-avatartransparentAvatar background surface.
--fd-visual-avatar-placeholder-color#b0b0b3Placeholder avatar silhouette color.

Shadow parts

NameDescription
surfaceOuter circular wrapper.
contentInner frame that centers slotted media or the fallback visual.
fallbackBuilt-in archive glyph or placeholder avatar wrapper when no slot content is supplied.
  • fd-visual stays decorative-only in v1 and sets aria-hidden="true" on the host.
  • For avatar images, prefer empty alt text when adjacent content already names the subject.

Best practices

Do

Pair the visual with nearby text

The visual should support recognition, not replace the visible label or description that explains the content.

Don't

Turn the circle into a mystery control

Adding click or toggle behavior changes the semantics materially. Use a real interactive component when users must act on the visual.

Do

Use decorative slot content only

Compose fd-icon or an avatar image when needed, but keep that slotted media presentational and non-interactive.

Don't

Rely on color alone for grouping

The tone helps scanning, but users still need nearby text, headings, or layout structure to understand what is related.

Composition guidance

  • Default fallback — Non-avatar tones render a built-in archive-style glyph when no slot content is provided. Use that when a generic visual cue is sufficient.
  • Custom icon — Slot an fd-icon when you need a different decorative glyph:
html
<fd-visual type="cool" size="lg">
  <fd-icon name="download" aria-hidden="true"></fd-icon>
</fd-visual>
  • Avatar image — Slot an image only when the surrounding UI already names the person or entity:
html
<fd-visual type="avatar" size="xl">
  <img alt="" src="/team/jordan-hall.jpg" />
</fd-visual>

Accessibility

  • fd-visual is decorative-only in v1. The host sets aria-hidden="true" and does not create its own accessible name.
  • The component exposes no keyboard interaction and no tab stop.
  • Slotted content should remain presentational. Do not slot focusable controls or content that must be announced independently.
  • For avatar images, prefer empty alt text when adjacent text already names the subject.
  • Forced-colors mode preserves a visible circular boundary and visible fallback glyph or placeholder silhouette.

Known limitations

  • fd-visual does not support built-in src, alt, name, or label convenience properties in v1.
  • The component does not provide overlays, counters, badges, or status markers inside the circle.
  • The primitive is intentionally static. Interactive, selectable, or dismissible variations are out of scope.
  • Icon — use fd-icon inside fd-visual when you need a different decorative glyph.
  • Badge — use a badge when the visible text label itself should be rendered inside the compact surface.
  • Chip — use a chip when users must remove an item from a visible set.