Token导航 LogoToken导航TokenDH.com
前端设计external-serviceunknown未标认证来源可访问许可证需确认审计通过

react-spectrum-s2React spectrum S2 前端

Agent Skill

用于辅助前端页面、组件、样式和交互逻辑的开发与维护。它适合让 Agent 生成或审查 React、Next.js、Vue、Tailwind、CSS 等相关代码,整理组件结构,或定位布局和性能问题。使用时需要结合项目现有设计系统、路由和构建方式,避免只生成孤立片段;涉及页面改动时,应配合本地预览和构建检查确认视觉效果。

总安装

10,134

周安装

406

下载量

3,280
Local Agent

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:react-spectrum-s2(React spectrum S2 前端)
来源仓库:https://react-spectrum.adobe.com
仓库路径:react-spectrum-s2
安装命令:
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。当前暂无明确安装命令,请以来源页面说明为准。

简介

辅助 Adobe Spectrum S2 设计系统下的 React 开发。

  • 适用于生成或审查符合 Spectrum S2 规范的组件代码。
  • 可整理主题、样式与无障碍交互实现细节。react-spectrum-s2 属于前端设计类 Skill,可作为该场景下的辅助能力补充。
  • 需结合 Adobe 官方设计系统与项目品牌规范使用。
  • 涉及视觉改动时应配合设计稿与无障碍测试验证。

SKILL.md

React Spectrum S2 (Spectrum 2)

React Spectrum S2 is Adobe's implementation of the Spectrum 2 design system in React. It provides a collection of accessible, adaptive, and high-quality UI components.

If the requirements do not clearly specify which React Spectrum component to use, consult the Component Decision Tree before choosing a component.

Styling

Use React Spectrum S2 components and the S2 style macro as the default styling approach.

  • Import the style macro using the {type: 'macro'} import attribute: import {style} from '@react-spectrum/s2/style' with {type: 'macro'};
  • Remember that the style macro runs at build time and returns class names.
  • Avoid introducing Tailwind, radix-ui, shadcn/ui, or any other third-party design system components in S2 implementations.
  • Prefer S2 components first, and use their styles prop only for the supported layout-style properties.
  • For generic layouts (flex, grid, etc.), use native HTML elements with the style macro.
  • For card-style layouts, use the S2 Card component instead of building something custom.
  • IMPORTANT: Avoid using the UNSAFE_style and UNSAFE_className props.

For React Spectrum components, the styles prop is intentionally limited. Supported properties are:

  • margin, marginStart, marginEnd, marginTop, marginBottom, marginX, marginY
  • width, minWidth, maxWidth
  • flexGrow, flexShrink, flexBasis
  • justifySelf, alignSelf, order
  • gridArea, gridRow, gridRowStart, gridRowEnd, gridColumn, gridColumnStart, gridColumnEnd
  • position, zIndex, top, bottom, inset, insetX, insetY, insetStart, insetEnd
  • visibility
  • height, minHeight, maxHeight (only in specific components without an intrinsic height)

Example:

import {style} from '@react-spectrum/s2/style' with {type: 'macro'};
import {Button} from '@react-spectrum/s2';

<Button styles={style({marginStart: 8})}>Edit</Button>

When styling native HTML elements or React Aria Components, use className={style(...)} instead of the limited styles prop. In those cases, you are not limited to the React Spectrum component property subset.

Example:

import {style} from '@react-spectrum/s2/style' with {type: 'macro'};
import {Checkbox} from 'react-aria-components';

<div className={style({display: 'grid', gap: 12, padding: 16, backgroundColor: 'gray-75'})}>
  <h2 className={style({font: 'heading-sm'})}>Preferences</h2>
  <Checkbox
    className={style({
      display: 'flex',
      alignItems: 'center',
      gap: 8,
      color: {
        default: 'neutral',
        isSelected: 'blue-900'
      }
    })}
  />
</div>

The style macro supports runtime conditions:

import {style} from '@react-spectrum/s2/style' with {type: 'macro'};

const styles = style({
  backgroundColor: {
    variant: {
      primary: 'accent',
      secondary: 'neutral'
    }
  }
});

function MyComponent({variant}: {variant: 'primary' | 'secondary'}) {
  return <div className={styles({variant})} />
}

Boolean conditions starting with is or allows can be used directly without nesting:

const styles = style({
  backgroundColor: {
    default: 'gray-100',
    isSelected: 'gray-900',
    allowsRemoving: 'gray-400'
  }
});

<div className={styles({isSelected: true})} />

Note:

  • Base spacing values (for margin, gap, etc.): Use pixels following a 4px grid (0, 2, 4, 8, 12, 16...)

See Styling for the full guide and Style Macro for the full property and utility reference.

If you encounter issues related to the style macro import, see the 'Framework setup' section of the Getting started guide.

Typography

Avoid using Text/Heading/Content as standalone typography primitives. These should only be used inside specific React Spectrum components where they inherit the intended slots and default styles.

  • Use Text/Heading/Content inside components like cards, lists, pickers, menus, tabs, and other Spectrum composition APIs where slot="label", slot="description", or default/implicit Text slots are used. Component docs will have examples of these.
  • For standalone headings, body copy, captions, and other page-level typography, use native HTML elements plus the style macro.

Example:

import {style} from '@react-spectrum/s2/style' with {type: 'macro'};

<section>
  <h1 className={style({font: 'heading-xl', marginBottom: 8})}>
    Project overview
  </h1>
  <p className={style({font: 'body', color: 'neutral-subdued'})}>
    Review status, owners, and upcoming milestones.
  </p>
  <p className={style({font: 'body-sm', marginTop: 12})}>
    Last updated 2 hours ago
  </p>
</section>

See Style Macro for the available typography tokens and related text styling options.

Icons

Use React Spectrum's built-in icons and illustrations.

  • Import icons from @react-spectrum/s2/icons/...
  • Import illustrations from @react-spectrum/s2/illustrations/...
  • Avoid introducing third-party icon libraries such as lucide-react, phosphor-icons, or heroicons

Commonly used icons include AlertTriangle, Close, ChevronDown, Checkmark, Preview, CheckmarkCircle, Add, ChevronUp, Data, FileText, InfoCircle, OpenIn, Chat, and Code.

Example icon:

import AlertTriangle from '@react-spectrum/s2/icons/AlertTriangle';

<AlertTriangle />

Example illustrations:

import DropToUpload from '@react-spectrum/s2/illustrations/gradient/generic1/DropToUpload';

<DropToUpload />
  • Note that illustrations can be in a Gradient or Linear style.
  • Gradient illustrations can include Generic 1 and Generic 2 variants.

See Icons and Illustrations for the full catalogs and usage guidance.

Documentation Structure

The references/ directory contains detailed documentation organized as follows:

Guides

  • Component Decision Tree: How to choose the right S2 component when requirements do not name one explicitly.
  • Collections: Many components display a collection of items, and provide functionality such as keyboard navigation, and selection. Learn how to load and render collections using React Spectrum's compositional API.
  • Forms: Learn how to integrate with HTML forms, validate and submit data, and use React Spectrum with form libraries.
  • Getting started: ## Installation
  • Migrating to Spectrum 2: Learn how to migrate from React Spectrum v3 to Spectrum 2.
  • Selection: Many collection components support selecting items by clicking or tapping them, or by using the keyboard. Learn how to handle selection events, how to control selection programmatically, and the data structures used to represent a selection.
  • Style Macro: The macro supports a constrained set of values per property that conform to Spectrum 2.
  • Styling: Learn how to use the macro to apply Spectrum tokens directly in your components with type-safe autocompletion.
  • Testing: Learn how to test an application built with React Spectrum using test utilities to simulate common user interactions.
  • Working with AI: Learn how to use the React Spectrum MCP Server, Agent Skills, and more to help you build with AI.

Components

  • Accordion: An accordion is a container for multiple accordion items.
  • ActionBar: Action bars are used for single and bulk selection patterns when a user needs to perform actions on one or more items at the same time.
  • ActionButton: ActionButtons allow users to perform an action.
  • ActionButtonGroup: An ActionButtonGroup is a grouping of related ActionButtons.
  • ActionMenu: ActionMenu combines an ActionButton with a Menu for simple "more actions" use cases.
  • Avatar: An avatar is a thumbnail representation of an entity, such as a user or an organization.
  • AvatarGroup: An avatar group is a grouping of avatars that are related to each other.
  • Badge: Badges are used for showing a small amount of color-categorized metadata, ideal for getting a user's attention.
  • Breadcrumbs: Breadcrumbs show hierarchy and navigational context for a user's location within an application.
  • Button: Buttons allow users to perform an action.
  • ButtonGroup: ButtonGroup handles overflow for a grouping of buttons whose actions are related to each other.
  • Calendar: Calendars display a grid of days in one or more months and allow users to select a single date.
  • Card: A Card summarizes an object that a user can select or navigate to.
  • CardView: A CardView displays a group of related objects, with support for selection and bulk actions.
  • Checkbox: Checkboxes allow users to select multiple items from a list of individual items,
  • CheckboxGroup: A CheckboxGroup allows users to select one or more items from a list of choices.
  • ColorArea: A ColorArea allows users to adjust two channels of an RGB, HSL or HSB color value against a two-dimensional gradient background.
  • ColorField: A color field allows users to edit a hex color or individual color channel value.
  • ColorSlider: A ColorSlider allows users to adjust an individual channel of a color value.
  • ColorSwatch: A ColorSwatch displays a preview of a selected color.
  • ColorSwatchPicker: A ColorSwatchPicker displays a list of color swatches and allows a user to select one of them.
  • ColorWheel: A ColorWheel allows users to adjust the hue of an HSL or HSB color value on a circular track.
  • ComboBox: ComboBox allow users to choose a single option from a collapsible list of options when space is limited.
  • ContextualHelp: Contextual help shows a user extra information about the state of an adjacent component, or a total view.
  • DateField: DateFields allow users to enter and edit date and time values using a keyboard.
  • DatePicker: DatePickers combine a DateField and a Calendar popover to allow users to enter or select a date and time value.
  • DateRangePicker: DateRangePickers combine two DateFields and a RangeCalendar popover to allow users
  • Dialog: Dialogs are windows containing contextual information, tasks, or workflows that appear over the user interface.
  • Disclosure: A disclosure is a collapsible section of content. It is composed of a header with a heading and trigger button, and a panel that contains the content.
  • Divider: Dividers bring clarity to a layout by grouping and dividing content in close proximity.
  • DropZone: A drop zone is an area into which one or multiple objects can be dragged and dropped.
  • Form: Forms allow users to enter data that can be submitted while providing alignment and styling for form fields.
  • Icons: React Spectrum offers a set of open source icons that can be imported from.
  • IllustratedMessage: An IllustratedMessage displays an illustration and a message, usually
  • Illustrations: React Spectrum offers a collection of illustrations that can be imported from.
  • Image: An image with support for skeleton loading and custom error states.
  • InlineAlert: Inline alerts display a non-modal message associated with objects in a view.
  • Link: Links allow users to navigate to a different location.
  • LinkButton: A LinkButton combines the functionality of a link with the appearance of a button. Useful for allowing users to navigate to another page.
  • ListView: A ListView displays a list of interactive items, and allows a user to navigate, select, or perform an action.
  • mcp
  • Menu: Menus display a list of actions or options that a user can choose.
  • Meter: Meters are visual representations of a quantity or an achievement.
  • NumberField: NumberFields allow users to input number values with a keyboard or increment/decrement with step buttons.
  • Picker: Pickers allow users to choose a single option from a collapsible list of options when space is limited.
  • Popover: A popover is an overlay element positioned relative to a trigger.
  • ProgressBar: ProgressBars show the progression of a system operation: downloading, uploading, processing, etc., in a visual way.
  • ProgressCircle: ProgressCircles show the progression of a system operation such as downloading, uploading, or processing, in a visual way.
  • Provider: Provider is the container for all React Spectrum components.
  • RadioGroup: Radio groups allow users to select a single option from a list of mutually exclusive options.
  • RangeCalendar: RangeCalendars display a grid of days in one or more months and allow users to select a contiguous range of dates.
  • RangeSlider: RangeSliders allow users to quickly select a subset range. They should be used when the upper and lower bounds to the range are invariable.
  • SearchField: A SearchField is a text field designed for searches.
  • SegmentedControl: A SegmentedControl is a mutually exclusive group of buttons used for view switching.
  • SelectBoxGroup: SelectBoxGroup allows users to select one or more options from a list.
  • Skeleton: A Skeleton wraps around content to render it as a placeholder.
  • Slider: Sliders allow users to quickly select a value within a range. They should be used when the upper and lower bounds to the range are invariable.
  • StatusLight: Status lights are used to color code categories and labels commonly found in data visualization.
  • Switch: Switches allow users to turn an individual option on or off.
  • TableView: Tables are containers for displaying information. They allow users to quickly scan, sort, compare, and take action on large amounts of data.
  • Tabs: Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of tabs should be related and form a coherent unit.
  • TagGroup: Tags allow users to categorize content. They can represent keywords or people, and are grouped to describe an item or a search request.
  • TextArea: A textarea allows a user to input mult-line text.
  • TextField: TextFields are text inputs that allow users to input custom text entries
  • TimeField: TimeFields allow users to enter and edit time values using a keyboard.
  • Toast: A ToastContainer renders the queued toasts in an application. It should be placed
  • ToggleButton: ToggleButtons allow users to toggle a selection on or off, for example
  • ToggleButtonGroup: A ToggleButtonGroup is a grouping of related ToggleButtons, with single or multiple selection.
  • Tooltip: Display container for Tooltip content. Has a directional arrow dependent on its placement.
  • TreeView: A tree view provides users with a way to navigate nested hierarchical information.

Testing

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Local Agent

71.73%
按下载量换算2,353

安全审计

Socket

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills