chi-component-schemas

Validate Chi UI component modifiers, attributes, and accessibility against predefined schemas.

17|63|Updated Mar 12, 2021
One-click install
npx skills add https://github.com/CenturyLink/Chi --skill chi-component-schemas
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: chi-component-schemas
Source: https://github.com/CenturyLink/Chi/tree/main/.cursor/skills/chi-component-schemas
Command: npx skills add https://github.com/CenturyLink/Chi --skill chi-component-schemas

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill ensures that Chi components are used correctly according to design system rules, preventing implementation errors and improving consistency.

Core Features & Use Cases

  • Modifier Validation: Checks if component modifiers are allowed and if conflicting modifiers are avoided.
  • Attribute Validation: Verifies required and recommended HTML attributes for components.
  • Accessibility Checks: Ensures components meet accessibility standards for roles and ARIA attributes.
  • Use Case: When building a new UI element using a Chi button, this Skill can validate that you've used the correct color and size modifiers and that essential accessibility attributes like aria-label are present.

Quick Start

Use the chi-component-schemas skill to validate the usage of a 'chi-button' component with the class 'chi-button -primary -lg'.

Frequently Asked Questions about chi-component-schemas

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

FAQPage Schema
How do I validate Chi UI components for correct modifier and attribute usage?

Validate Chi UI components by analyzing their modifiers, HTML attributes, and accessibility roles against predefined design system schemas to ensure correct usage. This process enforces rules for allowed modifiers, conflicting groups, and required attributes.

What is component validation in a frontend design system?

Component validation in a design system verifies that UI elements adhere to predefined rules for allowed modifiers, required attributes, and accessibility standards. This ensures consistency and prevents implementation errors across frontend development.

How do I check my HTML for Chi component accessibility requirements?

Check HTML for Chi component accessibility by validating that elements meet standards for ARIA attributes and roles. The schema validation ensures essential attributes like aria-label are present on interactive elements such as buttons.

Does Chi component validation detect conflicting CSS modifiers?

Yes, Chi component validation detects conflicting CSS modifiers by enforcing predefined rules for allowed and conflicting modifier groups. This ensures design system specifications are met and prevents functional conflicts when applying multiple classes.

Can I use this component validation for frontend development without external dependencies?

You can use this component validation for frontend development without external dependencies. The validation operates independently, analyzing component modifiers, attributes, and accessibility requirements against its internal predefined schemas.

When should I validate Chi button modifiers during UI development?

Validate Chi button modifiers during UI development whenever building elements using classes like 'chi-button -primary -lg'. This ensures correct color and size modifiers are applied according to design system specifications.