
React Spectrum S2
Implement Adobe Spectrum 2 UIs with @react-spectrum/s2, Figma handoff, and test-utils instead of guessing component APIs.
Overview
React Spectrum S2 is an agent skill for the Build phase that helps developers implement UIs with @react-spectrum/s2 and Adobe Spectrum 2 patterns, including Figma and testing guidance.
Install
npx skills add https://github.com/react-spectrum.adobe.com --skill react-spectrum-s2What is this skill?
- Prefer S2 components over raw React Aria when requirements match the Spectrum design system
- Follow the Component Decision Tree before picking ambiguous components
- Figma MCP or design URLs: read figma-to-s2 guidance before generating UI code
- Testing: use @react-spectrum/test-utils ARIA pattern testers over fragile hand-rolled selectors
- Apache-2.0 Adobe skill with compatibility gate requiring @react-spectrum/s2 in the React project
Adoption & trust: 565 installs on skills.sh; 1/1 security scanners passed (skills.sh audits).
What problem does it solve?
You need Spectrum-compliant React UI but are unsure which S2 component to use, how to map Figma specs, or how to test accessible behavior without flaky queries.
Who is it for?
Indie and solo builders on React who already depend on @react-spectrum/s2 or must match Adobe design system deliverables from Figma.
Skip if: Teams on Material UI, shadcn-only stacks, or non-React frameworks, or projects without @react-spectrum/s2 installed.
When should I use this skill?
Developers use @react-spectrum/s2 or need Adobe Spectrum 2 components; ambiguous component choice, Figma/MCP design input, or S2-focused tests.
What do I get? / Deliverables
Generated React code uses documented S2 components, decision-tree choices, Figma-aligned structure, and test-utils-based tests consistent with Adobe’s stack.
- S2-based React component implementations
- Component choices justified via decision tree or guides
- Tests using @react-spectrum/test-utils patterns where applicable
Recommended Skills
Journey fit
How it compares
Spectrum-styled React component skill—not a generic Tailwind UI generator or unstyled headless-only React Aria tutorial.
Common Questions / FAQ
Who is react-spectrum-s2 for?
React developers and small teams implementing Adobe Spectrum 2 product UI with the official @react-spectrum/s2 library and related Adobe test utilities.
When should I use react-spectrum-s2?
Use it during Build when selecting S2 components, translating Figma designs to code, extending patterns with React Aria primitives, or writing tests that should follow Spectrum accessibility patterns.
Is react-spectrum-s2 safe to install?
Adobe publishes it under Apache-2.0 as documentation-style agent guidance; confirm package provenance and review the Security Audits panel on this Prism page before installing skills into your agent environment.
SKILL.md
READMESKILL.md - React Spectrum S2
# React Spectrum S2 (Spectrum 2) If the requirements do not clearly specify which React Spectrum component to use, consult the [Component Decision Tree](references/guides/component-decision-tree.md) before choosing a component. If the request involves a Figma design, frame, or URL — or if the Figma MCP (`get_design_context`,`search_design_system`, etc.) is available — consult [Implementing Figma designs with React Spectrum S2](references/guides/figma-to-s2.md) before generating code. When writing tests that exercise S2 components, consult [Testing with React Spectrum S2](references/guides/test-utils-guidance.md) and prefer the ARIA pattern testers from `@react-spectrum/test-utils` over hand-rolled role/selector queries. ## React Spectrum S2 vs React Aria Components React Spectrum S2 is built on top of React Aria Components. The S2 components add Spectrum 2 styling, behavior, and slot structure on top of the unstyled React Aria primitives. Always prefer S2 components for React Spectrum work because they are pre-styled, design-system compliant, and cover most common UI patterns. Only reach for React Aria Components directly when: - Building a custom component because no S2 component matches the requirements. Follow [Creating Custom Components](references/guides/creating-custom-components.md) and pair the React Aria primitive with the S2 `style` macro for Spectrum styling. - You need a utility such as `FocusScope`, `VisuallyHidden`, `useFocusRing`, `mergeProps`, etc. The React Aria Components documentation is bundled under `references/react-aria/`. Many unstyled React Aria Components share the same name as S2 components, so ensure that you're searching and accessing the correct docs where needed. ## Imports Use subpath imports matching the documentation — don't import from the package barrel `'@react-spectrum/s2'`: ```tsx import {Button} from '@react-spectrum/s2/Button'; import {Card, CardPreview, Image, Content, Text, Footer} from '@react-spectrum/s2/Card'; import {style} from '@react-spectrum/s2/style' with {type: 'macro'}; import Folder from '@react-spectrum/s2/icons/Folder'; import CloudUpload from '@react-spectrum/s2/illustrations/gradient/generic2/CloudUpload'; ``` Common types and list-data hooks are re-exported from `@react-spectrum/s2` — prefer importing from there instead of `react-aria-components`, `react-stately`, or `@react-types/*`: ```tsx import type {Key, Selection, SortDescriptor, PressEvent, RangeValue, DateValue, DateRange, TimeValue, RouterConfig} from '@react-spectrum/s2'; import {useListData, useTreeData, useAsyncList} from '@react-spectrum/s2'; ``` ### Use the typed Item for each collection Each S2 collection component has its own item export — there is no generic `Item` component. `Menu` → `MenuItem`/`MenuSection`; `Picker` → `PickerItem`/`PickerSection`; `ComboBox` → `ComboBoxItem`/`ComboBoxSection`; `ListView` → `ListViewItem`; `TreeView` → `TreeViewItem` (with `TreeViewItemContent`); `TableView` → `Row`/`Column`/`Cell`/`TableHeader`/`TableBody`; `SegmentedControl` → `SegmentedControlItem`; `TagGroup` → `Tag`; `Breadcrumbs` → `Breadcrumb`; `Accordion` → `AccordionItem` (with `AccordionItemHeader`/`AccordionItemTitle`/`AccordionItemPanel`). ## Styling Use S2 components and the S2 `style` macro as the default styling approach. - Prefer S2 components first; use their `styles` prop only for layout-style properties. - For generic layouts (flex, grid, etc.), use native HTML elements with the