OSSA: An Open‑Source Multi‑Platform UI Component Library Based on Taro
After three years of development, NetEase Yanxuan has open‑sourced OSSA, a TypeScript‑based, Taro‑powered UI component library that delivers over 30 cross‑platform components for WeChat, Alipay, ByteDance mini‑programs and H5, featuring monorepo management, on‑demand imports, automated testing, and a community‑driven roadmap.
After three years of iteration, NetEase Yanxuan’s multi‑platform component library OSSA is officially open‑sourced. The library targets teams that need to develop for multiple platforms (WeChat Mini‑Program, Alipay Mini‑Program, ByteDance Mini‑Program, and H5) using the Taro framework.
1. Background
1.1 Why multi‑platform? To keep up with business growth, the Yanxuan front‑end team launched several mini‑programs and an H5 site. Considering user experience and development efficiency, they chose Taro to share code across platforms.
1.2 Why build a custom component library? Existing Taro component libraries in 2019 did not match Yanxuan’s visual style, so a dedicated library was created to ensure design consistency and improve developer experience.
2. OSSA Component Library
2.1 Features
UI components built on Taro, compatible with the React ecosystem.
One set of components runs on WeChat, Alipay, ByteDance mini‑programs and H5.
30+ high‑quality components covering common mobile scenarios.
Written in TypeScript with full type definitions.
Supports on‑demand import.
Comprehensive automated test cases.
2.2 Architecture The overall architecture (illustrated in the original diagram) is based on a Taro template, then customized to meet internal design requirements.
2.3 Monorepo OSSA uses a monorepo managed by pnpm workspaces (instead of the now‑unmaintained Lerna) to handle core components, demos, and future packages such as a website and business component libraries.
2.4 Build & Packaging Rollup generates both CJS and ESM bundles, and tsc outputs raw TypeScript. Tree‑shaking for ESM is currently limited, so on‑demand import is achieved via babel-plugin-import configured in babel.config.js .
2.5 Deployment & Publishing Publishing is handled with pnpm together with changesets and automated GitHub Actions.
2.6 Standards A component review committee defines design, development, and testing processes. Code style is enforced with ESLint and Stylelint, naming conventions are documented, and end‑to‑end tests use Cypress.
2.7 Components The library currently includes basic, input, output, feedback, and navigation components. Demo QR codes (shown in the original article) allow users to explore the components on WeChat Mini‑Program and H5.
3. Future Plans
Enrich test cases for all platforms.
Expand the basic component set beyond the existing 30+ components.
Open‑source business component libraries and material assets.
Incorporate community feedback and suggestions.
The project acknowledges contributions from the Taro team and thanks individual contributors. Readers are invited to star the GitHub repository, join the WeChat group, and participate in OSSA’s development.
GitHub: https://github.com/NeteaseYanxuan/OSSA
NetEase Yanxuan Technology Product Team
The NetEase Yanxuan Technology Product Team shares practical tech insights for the e‑commerce ecosystem. This official channel periodically publishes technical articles, team events, recruitment information, and more.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.