Package Exports
- react-aria
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-aria) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
React ARIA
Utilities to help compose ARIA compliant components.
Usage
npm install react-aria --save
<script src="https://unpkg.com/react-aria/dist/react-aria.js"></script>
(UMD library exposed as `ReactARIA`)
Example
import { AriaManager, AriaToggle, AriaPopover, AriaItem } from 'react-aria'
class Dropdown extends Component {
state = {
selection: null
}
_handleSelection = (value, e) => {
this.setState({ selection: value })
}
render() {
return (
<AriaManager onItemSelection={this._handleSelection}>
{ isOpen =>
<div>
<AriaToggle>
{this.state.selection || 'Select A Dropdown Item'}
</AriaToggle>
{ isOpen &&
<AriaPopover role="menu">
<AriaItem>Apples</AriaItem>
<AriaItem>Pears</AriaItem>
<AriaItem>Oranges</AriaItem>
</AriaPopover>
}
</div>
}
</AriaManager>
)
}
}
Running Locally
clone repo
git clone git@github.com:souporserious/react-aria.git
move into folder
cd ~/react-aria
install dependencies
npm install
run dev mode
npm run dev
open your browser and visit: http://localhost:8080/
Thank You
Huge thank you to David Clark and all of his ARIA work. Most of the code in here is heavily inspired by what he has done.