3.36.1 • Published 3 months ago

react-stately v3.36.1

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

5 months ago

3.36.0

3 months ago

3.36.1

3 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.33.0

9 months ago

3.31.2-nightly.4698

11 months ago

3.31.2-nightly.4694

12 months ago

3.31.2-nightly.4695

11 months ago

3.31.2-nightly.4691

12 months ago

3.32.3-nightly.5022

10 months ago

3.32.2-nightly.4978

10 months ago

3.32.2-nightly.4979

10 months ago

3.31.2-nightly.4700

11 months ago

3.31.2-nightly.4701

11 months ago

3.31.2-nightly.4709

11 months ago

3.31.2-nightly.4704

11 months ago

3.31.2-nightly.4718

11 months ago

3.31.2-nightly.4723

11 months ago

3.31.1

1 year ago

3.31.2-nightly.4674

12 months ago

3.31.2-nightly.4673

12 months ago

3.31.2-nightly.4671

12 months ago

3.32.0

11 months ago

3.32.1

11 months ago

3.32.2

10 months ago

3.31.2-nightly.4685

12 months ago

3.31.2-nightly.4683

12 months ago

3.31.2-nightly.4684

12 months ago

3.31.2-nightly.4681

12 months ago

3.31.2-nightly.4734

11 months ago

3.31.2-nightly.4730

11 months ago

3.32.1-nightly.4738

11 months ago

3.32.2-nightly.4743

11 months ago

3.32.2-nightly.4980

10 months ago

3.32.2-nightly.4981

10 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

1 year 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

2 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

3 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

4 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