arkui-api-design

Design ArkUI component APIs compliant with OpenHarmony TypeScript/JavaScript coding standards.

Updated Sep 22, 2023
One-click install
npx skills add https://github.com/eclipse-oniro-mirrors/arkui_ace_engine --skill arkui-api-design-eclipse-oniro-mirrors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arkui-api-design
Source: https://github.com/eclipse-oniro-mirrors/arkui_ace_engine/tree/main/.claude/skills/arkui-api-design
Command: npx skills add https://github.com/eclipse-oniro-mirrors/arkui_ace_engine --skill arkui-api-design-eclipse-oniro-mirrors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

ArkUI API design guidance helps teams build consistent, well-documented ArkUI component interfaces that align with OpenHarmony coding standards.

Core Features & Use Cases

  • Guidelines for API design: naming conventions, type safety, code style, and documentation requirements per OpenHarmony guidance.
  • Modifier synchronization & deprecation planning: ensure properties and modifiers stay in sync; provide migration paths and deprecated API handling.
  • Resource typing and theming support: guidance for Resource types and theming considerations across components.
  • Practical use cases: designing new APIs, auditing existing ones, and generating JSDoc with proper @since and @deprecated annotations.

Quick Start

Start by requesting ArkUI API design guidance for a specific component, for example: design a Button API with width, height, and backgroundColor modifiers that follow OpenHarmony guidelines.

Frequently Asked Questions about arkui-api-design

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

FAQPage Schema
How do I design ArkUI component APIs that comply with OpenHarmony coding standards?

To design ArkUI component APIs compliant with OpenHarmony standards, follow guidelines for naming conventions, type safety, and length unit usage. This ensures your component interfaces maintain cross-component consistency and proper resource typing.

How should I handle deprecated ArkUI APIs and plan migrations?

Handle deprecated ArkUI APIs by providing clear migration paths and using proper @deprecated annotations in JSDoc. Ensure properties and modifiers stay synchronized during updates to maintain component stability across versions.

What is the best way to write JSDoc for ArkUI component interfaces?

The best way to write JSDoc for ArkUI components is to include proper @since and @deprecated annotations while documenting Resource types and theming considerations. This ensures interfaces are well-documented per OpenHarmony requirements.

Does ArkUI API design require specific handling for undefined and null values?

Yes, ArkUI API design requires specific handling for undefined and null values to enforce type safety across components. Following OpenHarmony guides ensures consistent behavior when these values are passed to component interfaces and Modifiers.

Can I use Resource types for theming across different ArkUI components?

Yes, you can use Resource types for theming across ArkUI components. The design guidance targets Resource type handling to ensure theming considerations are consistently applied and synchronized across different component interfaces.

Related Skills