ContentComponentBeta

Icon.

One contract. Your choice of character.

Consistent size, semantic color and accessible naming for the SVG icons you already use. Keep each pack’s artwork and install only what your application needs.

Make it yours

Preparing the example…

PROPERTIES4

A place to start

Usage

Import the stylesheet once at your application root. This complete example reflects the properties selected above.

Loading example…

Details that make a difference

Examples & states
The icon is not the action.

Change packs without changing size or color roles. Named image gives the SVG an accessible name; leave decoration unnamed inside a labeled button. Explore the Icons foundation for composition and supported-pack examples.

The finer details

API reference

Generated from Dixy’s local TypeScript interfaces. Native HTML attributes and refs are forwarded. The table covers Dixy’s own options.

Icon

PropType / descriptionDefault
render*ReactElement<SVGProps<SVGSVGElement>>

One SVG element or SVG icon component. Pack-specific props belong here.

—
sizeIconSize

The existing icon sizing token. Button children inherit their control's icon size unless explicitly set.

md
colorIconColor

A semantic icon foreground, or the surrounding text/control color.

inherit
labelstring

Accessible name for a meaningful standalone image. Omit for decorative icons.

—

Built from the same foundations

Styling tokens

Change Theme settings above to compare appearance, accent, neutral, radius, spacing density, motion and direction. Override component aliases on a Theme root so custom properties follow portaled content too. The wrapper merges className, style, refs and render composition with its owning primitive.

TokenPurpose
--dixy-size-icon-mdThe component-specific starting point.
--dixy-font-label-mdControl label font and line height; body roles remain readable in text inputs.
--dixy-color-background-selectedSelected surfaces use semantic color across appearances.
--dixy-color-border-focusFocus indication remains visible independently of shadows.
--dixy-spacing-inset-smDensity-aware component padding.
--dixy-motion-transition-feedbackShort state feedback, reduced by the inherited motion setting.
Explore theme customization

Consider everyone

Accessibility

Icons are decorative and hidden from assistive technology by default. Supply label for a meaningful standalone image. Put an action’s accessible name on IconButton; keep its child Icon decorative. Color never replaces status text. Icon itself is not a keyboard control.

Target: WCAG 2.2 AA. Automated tests cover selected behavior; manual screen-reader, contrast, and zoom validation remain part of the release checklist.

THE THINKING BEHIND IT

Build it. Then understand it.

The design system owns the visual and accessibility contract. The icon pack owns SVG geometry, fill, stroke and pack-specific props. render composition preserves SVG refs, events and viewBox without adding a wrapper or a runtime network dependency.

A token to follow--dixy-size-icon-md

Nothing up our sleeves

Source
UP NEXTTypography