# @tarojs/components

> Taro 组件库

Latest version **4.2.1** (published 2026-07-17) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tarojs/components
pnpm add @tarojs/components
yarn add @tarojs/components
bun add @tarojs/components
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score; high quality score; popular repo.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.2.1 |
| Published | 2026-07-17 |
| First published | 2018-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >= 18 |
| Dependencies | 10 |
| Unpacked size | 4 MB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 37674 |
| Maintainers | yuche, xuanzebin, defaultlee, drchan, kyjo, qq592743779, advancedcat, baosiqing, zakary, liuzejia, vasily.cjj, hardenzheng2 |

## Links

- npm: https://www.npmjs.com/package/@tarojs/components
- Repository: https://github.com/NervJS/taro
- Homepage: https://github.com/NervJS/taro#readme
- Issues: https://github.com/NervJS/taro/issues
- npm.io page: https://npm.io/package/@tarojs/components

## Dependencies (10)

- [tslib](https://npm.io/package/tslib.md) ^2.6.2
- [hls.js](https://npm.io/package/hls.js.md) ^1.1.5
- [swiper](https://npm.io/package/swiper.md) 11.1.15
- [hammerjs](https://npm.io/package/hammerjs.md) ^2.0.8
- [classnames](https://npm.io/package/classnames.md) ^2.2.5
- [@tarojs/taro](https://npm.io/package/@tarojs/taro.md) 4.2.1
- [@stencil/core](https://npm.io/package/@stencil/core.md) 2.22.3
- [@tarojs/shared](https://npm.io/package/@tarojs/shared.md) 4.2.1
- [@tarojs/runtime](https://npm.io/package/@tarojs/runtime.md) 4.2.1
- [resolve-pathname](https://npm.io/package/resolve-pathname.md) ^3.0.0

## Recent versions

- 4.2.1 (latest) — 2026-07-17
- 4.2.2-beta.5 (beta) — 2026-09-14
- 4.2.2-alpha.2 (alpha) — 2026-09-01
- 3.6.40 (v3-latest) — 2026-04-13
- 3.6.40-beta.1 (v3-beta) — 2026-03-25
- 4.0.9-alpha.8 (test) — 2025-05-14
- 4.0.7-canary.6 (canary) — 2024-11-12
- 4.0.2 (next) — 2024-07-16
- 3.6.15-theta.0 (theta) — 2024-05-06
- 3.6.24-nightly.10 (nightly) — 2024-02-28
- 2.2.22 (2.x) — 2024-01-09
- 3.0.29 (3.0) — 2021-03-09
- 1.3.46 (1.x) — 2020-10-21
- 0.0.0-experimental.2 (experimental) — 2020-04-27
- 4.2.2-beta.4 — 2026-09-08
- … 1186 more at https://npm.io/package/@tarojs/components/versions

## README

# @tarojs/components

Taro 组件库。

在小程序端，React/Nerv 指向 `mini/index.js`，Vue 无需使用此包。

在 H5 端，React/Nerv 指向 `h5/react/index.js`，Vue 指向 `h5/vue/index.js`。H5 端使用 [stencil](https://stenciljs.com/) 把组件编译为 Web Components 以提供跨框架调用。

> NOTE: `@stencil/react-output-target`、`@stencil/vue-output-target` 在 @tarojs/components-library-* 中存在一些特殊处理，验证过无问题可以自行升级。

---
_Source: https://npm.io/package/@tarojs/components · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
