Convert Figma logo to code with AI

adobe logoreact-spectrum

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.

12,840
1,111
12,840
720

Top Related Projects

18,417

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.

37,442

⚡️ Simple, Modular & Accessible UI Components for your React Applications

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

An enterprise-class UI design language and React UI library

Bootstrap components built with React

A utility-first CSS framework for rapid UI development.

Quick Overview

React Spectrum is a collection of libraries and tools for building adaptive, accessible, and robust user interfaces. It's developed by Adobe and includes a complete design system, UI components, and hooks for React applications. React Spectrum aims to provide a consistent and high-quality user experience across different platforms and devices.

Pros

  • Comprehensive set of accessible and customizable UI components
  • Built-in support for responsive design and adaptive layouts
  • Strong focus on accessibility and internationalization
  • Extensive documentation and design guidelines

Cons

  • Steep learning curve for developers new to the React Spectrum ecosystem
  • Limited customization options compared to some other UI libraries
  • Relatively large bundle size due to the comprehensive nature of the library
  • Potential lock-in to Adobe's design system and patterns

Code Examples

  1. Using a Button component:
import { Button } from '@adobe/react-spectrum';

function MyComponent() {
  return <Button variant="cta">Click me</Button>;
}
  1. Creating a form with Form and TextField components:
import { Form, TextField } from '@adobe/react-spectrum';

function MyForm() {
  return (
    <Form>
      <TextField label="Name" placeholder="Enter your name" />
      <TextField label="Email" placeholder="Enter your email" type="email" />
    </Form>
  );
}
  1. Using a Dialog component:
import { Dialog, DialogTrigger, Button } from '@adobe/react-spectrum';

function MyDialog() {
  return (
    <DialogTrigger>
      <Button>Open Dialog</Button>
      <Dialog>
        <Heading>Dialog Title</Heading>
        <Divider />
        <Content>This is the dialog content.</Content>
      </Dialog>
    </DialogTrigger>
  );
}

Getting Started

To start using React Spectrum in your project:

  1. Install the necessary packages:
npm install @adobe/react-spectrum
  1. Import and use components in your React application:
import { Provider, defaultTheme, Button } from '@adobe/react-spectrum';

function App() {
  return (
    <Provider theme={defaultTheme}>
      <Button variant="primary">Hello, React Spectrum!</Button>
    </Provider>
  );
}

Make sure to wrap your application with the Provider component and specify a theme to enable proper styling and functionality of React Spectrum components.

Competitor Comparisons

18,417

Fluent UI web represents a collection of utilities, React components, and web components for building web applications.

Pros of Fluent UI

  • Larger ecosystem with more components and integrations
  • Stronger focus on Microsoft-specific technologies and platforms
  • More extensive documentation and community support

Cons of Fluent UI

  • Steeper learning curve due to its size and complexity
  • Less emphasis on accessibility compared to React Spectrum
  • Potentially slower performance for large-scale applications

Code Comparison

React Spectrum:

import { Button } from '@adobe/react-spectrum'

function MyComponent() {
  return <Button variant="cta">Click me</Button>
}

Fluent UI:

import { PrimaryButton } from '@fluentui/react'

function MyComponent() {
  return <PrimaryButton text="Click me" />
}

Both libraries offer component-based UI development for React applications. React Spectrum focuses on accessibility and cross-platform consistency, while Fluent UI provides a more extensive set of components tailored for Microsoft's design language. React Spectrum's API tends to be more concise and intuitive, whereas Fluent UI offers more customization options at the cost of increased complexity. The choice between the two depends on project requirements, target platforms, and team familiarity with each library's ecosystem.

37,442

⚡️ Simple, Modular & Accessible UI Components for your React Applications

Pros of Chakra UI

  • More flexible and customizable out of the box
  • Larger community and ecosystem with more third-party components
  • Lighter weight and faster initial load times

Cons of Chakra UI

  • Less comprehensive accessibility features
  • Fewer enterprise-grade components for complex applications
  • Less consistent design language across components

Code Comparison

Chakra UI:

import { Button } from "@chakra-ui/react"

function MyComponent() {
  return <Button colorScheme="blue">Click me</Button>
}

React Spectrum:

import { Button } from "@adobe/react-spectrum"

function MyComponent() {
  return <Button variant="cta">Click me</Button>
}

Both Chakra UI and React Spectrum are popular component libraries for React applications. Chakra UI offers more flexibility and customization options, making it suitable for a wide range of projects. It has a larger community and ecosystem, which means more third-party components and resources are available.

React Spectrum, developed by Adobe, focuses on enterprise-grade components and comprehensive accessibility features. It provides a more consistent design language across its components, which can be beneficial for larger applications.

In terms of code, both libraries offer similar ease of use, with slight differences in prop naming and component structure. Chakra UI tends to use more descriptive prop names, while React Spectrum follows Adobe's design system more closely.

Material UI: Comprehensive React component library that implements Google's Material Design. Free forever.

Pros of Material-UI

  • Larger community and ecosystem, with more third-party components and resources
  • More customizable theming system with a wider range of pre-built themes
  • Better documentation and examples for beginners

Cons of Material-UI

  • Larger bundle size, which may impact performance for smaller projects
  • Steeper learning curve due to more complex API and configuration options
  • Less focus on accessibility compared to React Spectrum

Code Comparison

Material-UI:

import Button from '@mui/material/Button';

<Button variant="contained" color="primary">
  Click me
</Button>

React Spectrum:

import {Button} from '@adobe/react-spectrum';

<Button variant="cta">
  Click me
</Button>

Both libraries offer similar component APIs, but React Spectrum tends to have simpler prop names and fewer options, which can lead to more consistent usage across projects. Material-UI provides more customization options out of the box, allowing for greater flexibility in design implementation.

While both libraries are well-maintained and regularly updated, Material-UI has a larger community and more frequent releases, which can lead to faster bug fixes and feature additions. However, React Spectrum's focus on accessibility and Adobe's design system may make it a better choice for projects that prioritize these aspects.

An enterprise-class UI design language and React UI library

Pros of Ant Design

  • Larger ecosystem with more components and extensive documentation
  • Highly customizable with a powerful theming system
  • Strong community support and frequent updates

Cons of Ant Design

  • Larger bundle size, which may impact performance
  • Steeper learning curve due to its extensive API and features
  • Less focus on accessibility compared to React Spectrum

Code Comparison

Ant Design button example:

import { Button } from 'antd';

const MyComponent = () => (
  <Button type="primary">Click me</Button>
);

React Spectrum button example:

import { Button } from '@adobe/react-spectrum';

const MyComponent = () => (
  <Button variant="cta">Click me</Button>
);

Both libraries offer similar component APIs, but React Spectrum focuses more on accessibility and Adobe's design system. Ant Design provides more customization options and a wider range of components out of the box.

Ant Design is well-suited for large-scale applications with complex UI requirements, while React Spectrum excels in creating accessible and consistent interfaces aligned with Adobe's ecosystem.

Bootstrap components built with React

Pros of React-Bootstrap

  • Widely adopted and well-established in the React community
  • Extensive documentation and large user base for support
  • Seamless integration with existing Bootstrap CSS

Cons of React-Bootstrap

  • Less modern design aesthetic compared to React Spectrum
  • Limited accessibility features out of the box
  • Slower release cycle for new features and updates

Code Comparison

React-Bootstrap:

import { Button } from 'react-bootstrap';

<Button variant="primary">Click me</Button>

React Spectrum:

import { Button } from '@adobe/react-spectrum';

<Button variant="cta">Click me</Button>

Key Differences

  • React Spectrum offers a more cohesive and modern design system
  • React Spectrum provides better built-in accessibility features
  • React-Bootstrap has a larger community and more third-party resources
  • React Spectrum is backed by Adobe, ensuring consistent updates and support
  • React-Bootstrap allows for easier customization with existing Bootstrap knowledge

Use Cases

  • Choose React-Bootstrap for projects already using Bootstrap or requiring extensive customization
  • Opt for React Spectrum when building enterprise-level applications with a focus on accessibility and modern design

Both libraries offer robust component sets, but React Spectrum excels in accessibility and design consistency, while React-Bootstrap shines in flexibility and community support.

A utility-first CSS framework for rapid UI development.

Pros of Tailwind CSS

  • Highly customizable and flexible utility-first CSS framework
  • Smaller bundle size and better performance due to purging unused styles
  • Rapid prototyping and development with pre-built utility classes

Cons of Tailwind CSS

  • Steeper learning curve for developers new to utility-first CSS
  • Can lead to verbose and cluttered HTML markup
  • Less opinionated design system compared to React Spectrum

Code Comparison

Tailwind CSS:

<button class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded">
  Click me
</button>

React Spectrum:

import {Button} from '@adobe/react-spectrum'

<Button variant="cta">Click me</Button>

React Spectrum provides pre-built, accessible components with consistent styling, while Tailwind CSS offers utility classes for custom styling. Tailwind CSS allows for more granular control over styles but requires more markup, whereas React Spectrum provides a more streamlined approach with pre-defined components and variants.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

React Spectrum Libraries

A collection of libraries and tools that help you build adaptive, accessible, and robust user experiences.

React Spectrum

A React implementation of Spectrum, Adobe’s design system. Spectrum provides adaptive, accessible, and cohesive experiences for all Adobe applications.

Explore React Spectrum

React Aria

A library of unstyled React components and hooks that helps you build accessible, high quality UI components for your application or design system.

Learn more about React Aria

React Stately

A library of React Hooks that provides cross-platform state management for your design system.

More information about React Stately

Internationalized

A collection of framework-agnostic internationalization libraries for the web.

Internationalized Packages

Features

  • ♿️ Accessible – Accessibility and behavior is implemented according to WAI-ARIA Authoring Practices, including full screen reader and keyboard navigation support. All components have been tested across a wide variety of screen readers and devices to ensure the best experience possible for all users.
  • 📱 Adaptive – All components are designed to work with mouse, touch, and keyboard interactions. They’re built with responsive design principles to deliver a great experience, no matter the device.
  • 🌍 International – Support over 30 languages is included out of the box, including support for right-to-left languages, date and number formatting, and more.
  • 🎨 Customizable – React Spectrum components support custom themes, and automatically adapt for dark mode. For even more customizability, you can build your own components with your own DOM structure and styling using the React Aria and React Stately hooks to provide behavior, accessibility, and interactions.

Getting started

React Spectrum includes several libraries, which you can choose depending on your usecase.

  • React Spectrum is an implementation of Adobe's design system. If you’re integrating with Adobe software or would like a complete component library to use in your project, look no further!
  • React Aria is a collection of unstyled React components and hooks that helps you build accessible, high quality UI components for your own application or design system. If you're building a component library for the web from scratch with your own styling, start here.
  • React Stately is a library of state management hooks for use in your component library. If you're using React Aria, you'll likely also use React Stately, but it can also be used independently (e.g. on other platforms like React Native).

Read more about our architecture.

Contributing

One of the goals of the React Spectrum project is to make building design systems and component libraries as easy as possible, while maintaining high quality interactions and accessibility support. We aim to raise the bar for web applications. The best way to achieve that goal is together. We would love contributions from the community no matter how big or small. 😍

Read our contributing guide to learn about how to propose bugfixes and improvements, and how the development process works. For detailed information about our architecture, and how all of the pieces fit together, read our architecture docs.

NPM DownloadsLast 30 Days