icon-usage

Guide token-based and Iconify icon usage in @techsio/ui-kit with accessibility rules.

2|Updated Dec 2, 2024
One-click install
npx skills add https://github.com/TechsioCZ/new-engine --skill icon-usage
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: icon-usage
Source: https://github.com/TechsioCZ/new-engine/tree/main/libs/ui/skills/icon-usage
Command: npx skills add https://github.com/TechsioCZ/new-engine --skill icon-usage

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Icons are often implemented inconsistently across apps, causing visual drift and accessibility gaps. This Skill guides how to use token-based icons and Iconify icons within the @techsio/ui-kit to maintain consistent, scalable, and accessible iconography.

Core Features & Use Cases

  • Prefer token icons for UI semantics to ensure consistency across components and themes.
  • Use Iconify icons only when no token icon exists for the desired state, while keeping proper size and color mappings.
  • Ensure icons are decorative when appropriate and always provide accessible text for assistive technologies.

Quick Start

Import the Icon component from @techsio/ui-kit and render a token icon with the appropriate size and color.

Frequently Asked Questions about icon-usage

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize icon usage with design tokens in a frontend UI kit?

Token-based icons ensure UI semantic consistency across components and themes by enforcing strict usage rules and prop contracts. They provide standardized size and color mappings, preventing the accessibility gaps common with ad-hoc icon implementations.

When should I use Iconify icons instead of token icons?

Use Iconify icons only when no token icon exists for the desired UI state. You must maintain proper size and color mappings to keep the Iconify icon visually consistent with the rest of the design system.

How do I make icons accessible within interactive controls?

To make icons accessible within interactive controls, mark them as decorative when appropriate and always provide accessible text for assistive technologies. This ensures screen readers properly convey the interactive element's purpose to users.

What is the best way to map icon sizes and colors to UI components?

The best way to map icon sizes and colors is by applying token-based properties to the Icon component within your UI kit. This enforces prop contracts that maintain scalable and accessible iconography across all application themes.

Why does icon visual drift happen and how can I prevent it?

Icon visual drift happens when iconography is implemented inconsistently across applications, causing mismatched semantics. Prevent it by using token-based icons to enforce strict usage rules, prop contracts, and standardized size and color mappings.