3.31.0 • Published 2 days ago

react-stately v3.31.0

Weekly downloads
1,835
License
Apache-2.0
Repository
github
Last release
2 days ago

React Stately

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

Features

  • 🏠 Foundational – React Stately provides the foundation and core logic for your component library. It handles state management for common components through an easy-to-use interface.
  • 📱 Cross-platform – React Stately only provides state management, with no assumptions about the DOM or other view systems.
  • ⚓️ Powered by React Hooks – React Stately is implemented as a library of React Hooks, which allows you to adapt them to your needs through composition.
  • 🎨 Design agnostic – React Stately doesn’t make any assumptions about your design. It provides state management that’s intrinsic to the functionality of the component.

Getting started

The easiest way to start building a component library with React Stately is by following our getting started guide. It walks through all of the steps needed to install the hooks from npm, and create your first component.

Example

Here is a very basic example of using React Aria.

import {useRadioGroupState} from '@react-stately/radio';

function RadioGroup(props) {
  let state = useRadioGroupState(props);

  return (
    <>
      <label>
        <input
          type="radio"
          name={state.name}
          checked={state.selectedValue === 'dogs'}
          onChange={() => state.setSelectedValue('dogs')}
        />
        Dogs
      </label>
      <label>
        <input
          type="radio"
          name={state.name}
          checked={state.selectedValue === 'cats'}
          onChange={() => state.setSelectedValue('cats')}
        />
        Cats
      </label>
    </>
  );
}

<RadioGroup
  defaultValue="dogs"
  onChange={(value) => alert(`Selected ${value}`)}
/>

Learn more

React Stately is part of a family of libraries that help you build adaptive, accessible, and robust user experiences. Learn more about React Spectrum and React Aria on our website.

@procore/core-react@pingux/astro@invisionag/components@stellaris/lynx@macjokerdz/silq-ui-lib@everything-registry/sub-chunk-2614ods-base@bob-obringer/ods@mittwald/flow-next-componentsinterweb-idinterweb-uiinterweb-walletfrida-uiinfomentor-design-systeminker-componentinterchain-idkyubi-jslian-design-system@evolt/react@easypost/easy-uiisuru-library@faulty/gdq-design@flatfile/design-systemmojtaba-design-systeme2n-uiekbeasy-penny-pod-inspectordua.designhammol-componentsfurya-chain-webgss-uim0mnnrhv6emedical-test-npmmedusa-core@snapcall/stream-ui@zorotek-ui/react@zebrains/design-system@ygorconfig/react@uvcemarvel/react-ui@ussebastian/kitdigital-reactnextjs-componentsacinguiux-ds-react-framework@vapor/uipn-ui-primitiespn-ui-primitivespoc-test-component-library@vinc3nzo/ui@veritone-ce/design-systempqc-storybook-test-1@sps-woodland/modal@sps-woodland/focused-task@spyrothon/sparx@strategies/ui.date@westpac/ui@trail-ui/reactopub-ui@twilio-paste/react-spectrum-library@sparrowengg/twigs-react@symblight/pavetra@syntatis/wp-classic-components@vygruppen/spor-input-react@vygruppen/spor-react@vygruppen/spor-datepicker-reactpenny-pod-inspectorartemis-design-systemptm-btn-test@adobe/reactor-extension-braze-edge@adobe/reactor-extension-cloud-connector-edge@adobe/reactor-extension-core-edge@adobe/reactor-extension-linkedin-edge@adobe/reactor-extension-meta-conversion-api-edge@adobe/reactor-extension-meta-pixel@adobe/reactor-extension-pinterest-edge@adobe/reactor-extension-twitter-edge@alice-ui/react@aivenio/aquarium@aivenio/design-systemanother-design-system@fuel-ui/react@gluestack-ui/menu@getkevin.eu/kevin-ui@galacean/editor-ui@actionishope/shelleyreact-atomic-componentsreact-atomic-elements@igloo-ui/color-picker@igloo-ui/datepicker@igloo-ui/disclosure@imwebme/zynk-modal@indico-data/design-systemstaysure-component-library@beamcloud/design-system@baseline-ui/core@bbl-digital/snorrecognavi-ui-librarysloy-ui@homebound/beam@interweb-ui/react@interchain-ui/react@cakepop/react
3.31.0

8 days ago

3.30.1

3 months ago

3.30.0

3 months ago

3.29.1

4 months ago

3.29.0

5 months ago

3.28.0

6 months ago

3.27.1

7 months ago

3.27.0

7 months ago

3.24.1-nightly.4004

11 months ago

3.24.1-nightly.4006

11 months ago

3.24.1-nightly.4042

10 months ago

3.24.1-nightly.4036

10 months ago

3.24.1-nightly.4038

10 months ago

3.24.1-nightly.4039

10 months ago

3.24.1-nightly.4022

10 months ago

3.24.1-nightly.4026

10 months ago

3.24.1-nightly.4028

10 months ago

3.23.1-nightly.3993

11 months ago

3.23.1-nightly.3997

11 months ago

3.24.1-nightly.4012

11 months ago

3.24.1-nightly.4013

10 months ago

3.24.1-nightly.4014

10 months ago

3.24.1-nightly.4016

10 months ago

3.24.1-nightly.4017

10 months ago

3.24.1-nightly.4018

10 months ago

3.23.1-nightly.3985

11 months ago

3.23.1-nightly.3987

11 months ago

3.23.1-nightly.3971

11 months ago

3.23.1-nightly.3976

11 months ago

3.23.1-nightly.3969

11 months ago

3.23.1-nightly.3960

11 months ago

3.23.1-nightly.3964

11 months ago

3.23.1-nightly.3940

11 months ago

3.23.1-nightly.3943

11 months ago

3.23.1-nightly.3937

12 months ago

3.22.1-nightly.3908

12 months ago

3.26.0

8 months ago

3.23.1-nightly.3921

12 months ago

3.24.0

11 months ago

3.25.0

9 months ago

3.23.0

12 months ago

3.22.1-nightly.3890

12 months ago

3.22.1-nightly.3898

12 months ago

3.22.1-nightly.3894

12 months ago

3.22.1-nightly.3901

12 months ago

3.22.1-nightly.3906

12 months ago

3.22.0

1 year ago

3.21.0

1 year ago

3.19.0

1 year ago

3.20.0

1 year ago

3.17.0

2 years ago

3.18.0

2 years ago

3.14.0

2 years ago

3.15.0

2 years ago

3.16.0

2 years ago

3.13.0

2 years ago

3.12.2

2 years ago

3.12.1

2 years ago

3.12.0

2 years ago

3.11.0

2 years ago

3.10.0

2 years ago

3.9.0

3 years ago

3.8.0

3 years ago

3.7.0

3 years ago

3.6.1

3 years ago

3.6.0

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.3.0

3 years ago

3.2.0

3 years ago

3.1.0

3 years ago

3.0.1

4 years ago

3.0.0

4 years ago

0.3.0

6 years ago

0.2.3

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

6 years ago