Skills2026年4月27日·1 分钟阅读

React Spectrum — Adobe's Accessible Design System for React

React Spectrum is Adobe's collection of libraries for building adaptive, accessible, and robust user interfaces, including React Aria hooks for accessibility and React Stately for state management.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
React Spectrum Adobe
直接安装命令
npx -y tokrepo@latest install 9b84e0ad-41f2-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

React Spectrum is Adobe's open-source design system built for React. It is split into three layers: React Spectrum (themed components), React Aria (accessibility hooks), and React Stately (state logic). You can use the full design system or pick only the hooks you need for custom components.

What React Spectrum Does

  • Provides 40+ production-ready components following Adobe's Spectrum design
  • Ships React Aria hooks for building accessible custom components without UI opinions
  • Manages complex state patterns (selections, overlays, collections) via React Stately
  • Handles internationalization with right-to-left layout, date/number formatting, and translations
  • Supports adaptive rendering for desktop and mobile interaction modes

Architecture Overview

The system follows a three-layer architecture. React Stately manages component state through framework-agnostic hooks. React Aria layers accessibility (ARIA attributes, keyboard navigation, focus management) on top of that state. React Spectrum combines both layers with Adobe's visual design tokens to produce themed, ready-to-use components.

Self-Hosting & Configuration

  • Install @adobe/react-spectrum for the full design system
  • Or install @react-aria/hooks and @react-stately packages individually for headless usage
  • Wrap your app in a Provider with a theme for color scheme and scale
  • Use the colorScheme prop on Provider to toggle light and dark modes
  • Configure locale via the Provider for automatic number and date formatting

Key Features

  • Three independent layers usable together or separately
  • WAI-ARIA compliant with keyboard, screen reader, and focus management built in
  • Adaptive interactions that switch between mouse and touch behavior
  • Server-side rendering support with no hydration mismatches
  • International date and number formatting with 30+ locale bundles

Comparison with Similar Tools

  • Radix Primitives — unstyled accessible primitives, no state management layer
  • Headless UI — Tailwind-team maintained, smaller component set
  • MUI — Material Design-oriented, includes visual styling by default
  • Chakra UI — styled with style props, less granular accessibility control
  • Ariakit — lightweight accessibility primitives, smaller scope

FAQ

Q: Can I use React Aria without the Spectrum theme? A: Yes. React Aria hooks provide accessibility behavior with zero styling. You supply all markup and CSS.

Q: Does it work with Next.js and SSR? A: Yes. React Spectrum supports server-side rendering and React Server Components with proper client boundaries.

Q: How does internationalization work? A: The Provider accepts a locale prop. Components automatically format dates, numbers, and handle RTL layout.

Q: Is React Spectrum free? A: Yes. All three layers are Apache-2.0 licensed.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产