# ArkTS Component Reference Template
## General Writing Instructions
| | Item | Writing Instruction |
| ---- | ------------------ | ------------------------------------------------------------ |
| 1 | Customer-oriented mindset| **Stand in the shoes of developers and provide the use cases, parameter selection principles, recommendations/tips, sample code, and anything else that a developer will need to develop the component.**|
| 2 | Upload path | Upload markdown files to **docs/en/application-dev/reference/apis-*ExampleKit*-kit/**.
Upload images to **docs/en/application-dev/reference/apis-*ExampleKit*-kit/figures**. In addition, reference the image path in the markdown file as follows: **\![]\(figures/exampleImage.jpg)**, **\![]\(figures/exampleImage.png)**, or **\![]\(figures/exampleImage.gif)**.|
| 3 | File name | Provide one TS component reference document for each .d.ts file. Name the file in the format of `ts-componentClassName-componentName.md`.
Examples:
For the basic component **\**, the reference file name is `ts-basic-component-text.md`.
For the container component **\**, the reference file name is `ts-container-list.md`.|
| 4 | Directory update | After uploading a TS component reference document, update the **Readme-EN.md** file in **docs/en/application-dev/reference/apis**.|
| 5 | Document structure | - Component description
- Initial version description
- Modules to import/Usage description
- Child components
- APIs, properties, events, objects, enums, and custom types
The order in which APIs are described in the document must be consistent with that in which they appear in the code. If some APIs have a logical sequence, pay attention to their sequence in the document.|
| 6 | Sample code programming language | Use code blocks to provide sample code, and mark the programming language ts by adding `// xxx.ets` at the beginning of every sample code block.|
| 7 | Link | Link format: [Link text]\(Link content)
Cross-folder link format: [markdown file name]\(\.\./../xxx/xxx.md). One `../` indicates one upper-level folder.
Intra-topic link format: [Interface A7+]\(#xxxa7). The text in the intra-topic link must be the same as the title to be linked. In the link, all letters must be in lowercase, and no special character (except the hyphen) or tag is included.|
## Mappings Between .d.ts Tags and Document Fields
Except for @since, document fields mapping to the following tags must be provided under each API.
For a property or interface table, if a tag has the same value for all the items in the table, you can place the tag description above the table. Otherwise, place the tag under **NOTE** for each item.
| .d.ts Tag | Description | Document Field |
| ------------------------------ | -------- | ------------------------------------------------------------ |
| @since | Version description| 1. Use the greater-than sign (>) followed by a space to indent the description about the initial version of the component. Unless otherwise marked, all APIs in the component have the same initial version.
2. When introducing an API to an existing component, use the `` tag to mark its initial version. The format is `versionNumber+`, for example, `7+`.
When introducing a property to an existing component, suffix the `` tag to the new property name, for example, `newProperty7+`.
When introducing a method to an existing component, suffix the `` tag to the method name, for example, `getSimIccId7+`. The same rule applies to new interfaces, classes, and enums.|
| @deprecated | Deprecated description| Do not delete the deprecated content from the document. Instead, suffix `deprecated` as a superscript to the content, and use the greater-than sign (>) to introduce the initial version and deprecated version. If there is no substitute API, provide the substitute solution.
Example: abandonmentMethod(deprecated)
> This API is supported since API version 4 and deprecated since API version 7. You are advised to use [newMethod]\(#newmethod) instead.|
| @FAModelOnly / @StageModelOnly | Model restriction description| **Model restriction**: This API can be used only in the FA model. **Model restriction**: This API can be used only in the stage model.|
| @form | Widget capability description| **Widget capability**: Since API version *x*, this feature is supported in ArkTS widgets.|
| @systemapi | System API description| **System API**: This is a system API. |
| @syscap | System capability description| **System capability**: SystemCapability.*A.B* |
| @permission | Permission | 1. If only one permission is required for using the component, use the following format:
**Required permissions**: ohos.permission.examplePermission
2. If multiple permissions are required for using the component, provide the permissions with **and** or **or** in the following format:
**Required permissions**: ohos.permission.examplePermissionA and ohos.permission.examplePermissionB
**Required permissions**: ohos.permission.examplePermissionA or ohos.permission.examplePermissionB|
| @extends | Inheritance | If the tag is carried or the extends relationship exists but the tag is not carried, clearly state the following information: *ExampleA* inherits from *ExampleB* (provide the link of *ExampleB*).|
The following describes the instructions for writing a specific component reference document.
***
# Document Title
> *Writing Instructions*
>
> - **Document title**: Use phrases that summarize the component functionalities. Examples: `Button` and `Slider`.
> - **Heading levels**: Use the document title as the level-1 heading, which is prefixed with `#` followed by a space. Use the functions, classes, interfaces, enums, and types as level-2 headings, which are prefixed with `##` followed by a space. Use the properties and functions under classes as level-3 headings, which are prefixed with `###` followed by a space.
> - **Initial version description**: Use the greater-than symbol (>) to indent the description about the initial version of the component. Use a line break after **NOTE**.
Place the version description after the component description. A component has only one initial version.
Use the following sentence: "This component is supported since API version *x*. Newly added APIs will be marked with a superscript to indicate their earliest API version." Change ***x*** to the actual version number.
Describe the component from its functionalities, use cases, and recommendations in this section.
**Example 1**: \