3.36.1 • Published 4 months ago

react-stately v3.36.1

Weekly downloads
1,835
License
Apache-2.0
Repository
github
Last release
4 months 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.

@invisionag/components@stellaris/lynx@macjokerdz/silq-ui-lib@everything-registry/sub-chunk-2614ods-base@bob-obringer/odsisuru-library@syntatis/wp-classic-componentstemplate-nextjs-tailwind-csstest_trtry@do-ob/ui@dodas/ui@code0-tech/pictor@composecure/compocomponents-test@cube-dev/ui-kit@cube-ui/components@cookbookdev/interchain-ui-react@cakepop/react@buyfood/components@boolfly.chat/fuselage@rotational/beacon-core@ygorconfig/reactdddddddgggessd-component-librarycomponent-library-for-medicalcomponent-library-test-medicaljm_dynamicformjm_dynamicformbuilderjlam-component-libisuru-test-component-librarye2n-uitest_qwuytisuru-component-librarywwwwwwwwwwwwwwwwwwfgs-component-libraryx-design-system@bbl-digital/snorre-v2medical-test-npmptm-btn-test@contember/uipoc-test-component-librarystaysure-component-librarystl_gayantest-comp-lib-tsttttest-component-library-test@antribute/ui@astroapps/aria-base@astroapps/aria-datepicker@atomicjolt/atomic-elements@arduino/arc@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@aivenio/aquarium@aivenio/design-system@alice-ui/react@bartkoelewijnnl/next-instantsearch@baton8/general-components@beamcloud/design-system@baseline-ui/core@bbl-digital/snorre@bruhabruh/ui@cc-apps/core@chrisellis/react-carpentry@choiceform/ui-react@charcoal-ui/react@accelint/design-system1mpacto-react-ui@actionishope/shelley@cmsgov/design-system@bornlogic/reborn@dcorp/web-ui@digimuza/ui@dataesr/dsfr-plus@faulty/gdq-design@flatfile/design-system@igloo-ui/disclosure@igloo-ui/color-picker@igloo-ui/datepicker@fuels/ui@fuel-ui/react@galacean/editor-ui@getkevin.eu/kevin-ui@gluestack-ui/menu@kovalevskaya/pavetra@kvib/react@lolmath/ui@lotta-schule/hubert@leopsousaa/meguiae-lib@interchain-ui/react@interweb-ui/react@mabi-ui/checkbox@mabi-ui/radio@magiclabs/ui@neo4j-ndl/react@nerdfish/ui@nikhilsparrow/twigs-react
3.35.0

6 months ago

3.36.0

4 months ago

3.36.1

4 months ago

3.34.0

7 months ago

3.32.3-nightly.5038

10 months ago

3.32.3-nightly.5032

10 months ago

3.32.3-nightly.5030

10 months ago

3.32.3-nightly.5042

10 months ago

3.33.0

9 months ago

3.31.2-nightly.4698

12 months ago

3.31.2-nightly.4695

12 months ago

3.32.3-nightly.5022

11 months ago

3.32.2-nightly.4978

11 months ago

3.32.2-nightly.4979

11 months ago

3.31.2-nightly.4700

12 months ago

3.31.2-nightly.4701

12 months ago

3.31.2-nightly.4709

12 months ago

3.31.2-nightly.4704

12 months ago

3.31.2-nightly.4718

12 months ago

3.31.2-nightly.4723

12 months ago

3.31.1

1 year ago

3.32.0

12 months ago

3.32.1

12 months ago

3.32.2

11 months ago

3.31.2-nightly.4734

12 months ago

3.31.2-nightly.4730

12 months ago

3.32.1-nightly.4738

12 months ago

3.32.2-nightly.4743

11 months ago

3.32.2-nightly.4980

11 months ago

3.32.2-nightly.4981

11 months ago

3.31.0

1 year ago

3.30.1

1 year ago

3.30.0

1 year ago

3.29.1

1 year ago

3.29.0

2 years ago

3.28.0

2 years ago

3.27.1

2 years ago

3.27.0

2 years ago

3.26.0

2 years ago

3.24.0

2 years ago

3.25.0

2 years ago

3.23.0

2 years ago

3.22.0

2 years ago

3.21.0

2 years ago

3.19.0

3 years ago

3.20.0

3 years ago

3.17.0

3 years ago

3.18.0

3 years ago

3.14.0

3 years ago

3.15.0

3 years ago

3.16.0

3 years ago

3.13.0

3 years ago

3.12.2

3 years ago

3.12.1

3 years ago

3.12.0

3 years ago

3.11.0

4 years ago

3.10.0

4 years ago

3.9.0

4 years ago

3.8.0

4 years ago

3.7.0

4 years ago

3.6.1

4 years ago

3.6.0

4 years ago

3.5.0

4 years ago

3.4.0

4 years ago

3.3.0

4 years ago

3.2.0

5 years ago

3.1.0

5 years ago

3.0.1

5 years ago

3.0.0

5 years ago

0.3.0

7 years ago

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago