# TS Component Reference Template
## General Writing Instructions
> **NOTE**
>
> Delete all writing instructions after you finish the writing.
| | 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/arkui-ts`.
Upload images to `docs/en/application-dev/reference/arkui-ts/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 `js-container-component-list.md`. |
| 4 | Directory update | After uploading a TS component reference document, update the `Readme-EN.md` file in `docs/en/application-dev/reference/arkui-ts`. |
| 5 | Document structure | - Component description
- Initial version description
- Modules to import/Usage description
- Permission description
- APIs, attributes, 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 | Initial 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 an attribute to an existing API, use the `` tag to mark its initial version. The format is `newAttributeversionNumber+`, for example, `newAttribute7+`. |
| 7 | Deprecated API 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 substitute API plus a link to the API description.
Example: abandonmentMethod(deprecated)
> This API is no longer maintained since API version 7. You are advised to use [newMethod]\(#newmethod) instead.|
| 8 | Permission description | Use "Required Permissions" as a level-2 heading.
1. If a specific permission required for using the component can be requested only by system applications, provide the description in the following format:
ohos.permission.examplePermission (available only to system applications)
2. If a specific permission required for using the component can be requested by all applications, provide the description in the following format:
ohos.permission.examplePermission
3. If multiple permissions are required for using the component, provide the permissions with `and` or `or` in the following format:
ohos.permission.examplePermissionA and ohos.permission.examplePermissionB
ohos.permission.examplePermissionA or ohos.permission.examplePermissionB |
| 9 | @system api | 1. If all APIs of the component are system APIs, add the following sentence to the next line of the initial version description:
The APIs provided by this component are system APIs.
2. If an API is a system API that can be used only by original equipment manufacturers (OEMs), add the following sentence to the API description:
**System API**: This is a system API. |
| 10 | 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.|
| 11 | 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.|
The following describes the instructions for writing a specific component reference document.
***
# Document Title
> *Writing Instructions:*
>
> 1. **Document title**: Use phrases that summarize the component functionalities. Examples: `Button` and `Slider`.
> 2. **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 attributes and functions under classes as level-3 headings, which are prefixed with `###` followed by a space.
> 3. **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**: \