arkui-api-quickref

Provides quick-reference tables for common ArkUI components, decorators, resources, and error fixes.

Updated Sep 3, 2026
One-click install
npx skills add https://github.com/YrracOwl/dsh-hmos-sidebar --skill arkui-api-quickref-yrracowl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: arkui-api-quickref
Source: https://github.com/YrracOwl/dsh-hmos-sidebar/tree/main/packages/dsh-hmos-sidebar/presets/native-harmonyos/skills/arkui-api-quickref
Command: npx skills add https://github.com/YrracOwl/dsh-hmos-sidebar --skill arkui-api-quickref-yrracowl

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing HarmonyOS ArkUI code often requires repeatedly looking up component properties, state decorators, resource reference syntax, and fixes for frequent compile errors, which slows down development with constant documentation round-trips. ## Core Features & Use Cases - Component Quick Reference: Tables of high-frequency ArkUI components (Text, Image, Button, List, Grid, Tabs, Navigation) with their common properties and usage patterns. - State Management & Resources: Covers V1 (@State/@Observed/@ObjectLink) and V2 (@Local/@Trace) state decorators plus $r resource reference syntax for media, strings, and colors. - Error Troubleshooting Table: Maps common errors like "Cannot find name", missing resources, and blank pages to their causes and fixes. - Use Case: While building a HarmonyOS settings page, quickly check the correct List/ForEach pattern and TextInput validation snippet, then verify the result with dcli__lsp_check. ## Quick Start Ask the agent to write an ArkUI list page with loading and empty states using the quick reference, then run dcli__lsp_check to validate the code.

Frequently Asked Questions about arkui-api-quickref

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

FAQPage Schema
How do I use common ArkUI components like List and TextInput?

Use List with ListItem and ForEach for rendering item arrays, and LazyForEach for long lists. TextInput supports placeholder, text, onChange, and maxLength for form input with validation via enabled state on buttons.

What is the difference between ArkUI V1 and V2 state decorators?

V1 uses @State, @Observed, and @ObjectLink for reactive state, while V2 uses @Local and @Trace. Check your project's state management style before choosing which decorator syntax to apply.

How do I reference images and strings in ArkUI resources?

Use $r('app.media.name') for images, $r('app.string.name') for strings, and $r('app.color.name') for colors. Formatted strings with %s or %d placeholders accept parameters like $r('app.string.x', param).

Why does my ArkUI page show blank or fail to route?

Blank pages usually mean the page is not registered in resources/base/profile/main_pages.json or the router.pushUrl path is wrong. Verify the pages path matches the registration file exactly.

When should I consult official HarmonyOS documentation instead of a quick reference?

Consult official docs for uncommon APIs, uncertain signatures, or new-version features not covered by the quick reference. The skill explicitly forbids inventing APIs and directs such cases to the hmos-doc-research workflow.