---
title: Component Configuration
---

The `[componentPath].json` file is used to identify the current custom component, so the declaration of `component: true` must be made. Custom components can reference each other.

## usingComponents

To referenceother components, follow these rules of supported component paths:

1. An absolute path, starting with `/`, indicating the source code directory of the miniapp.
2. A relative path, starting with `.` , based on the directory where the current JSON file is located.
3. npm third-party packages.

```json
{
  "usingComponents": {
    "foo": "/absolute/foo/index",
    "foo": "./relative/foo/index",
    "foo": "package/es/foo/index"
  }
}
```

**Note**: The path address must be accurate to the file name, and the default index cannot be omitted.

## Example

```json
{
  "component": true,
  "usingComponents": {
    "li": "/components/custom-li/index"
  }
}
```
