react-gui v0.2.1
react-gui
A framework for creating accessible, interactive, responsive apps with React.
React GUI uses modern React features to provide a consistent set of UX primitives for working with views, events, gestures, and other behaviors. The built-in Hooks allow for easy composition of behaviors and support the implementation of the WAI-ARIA Authoring Practices.
Requirements
node@>=12.15
: Import paths documented for this package rely on Node.js package entry points. Make sure your bundler also supports this Node API (e.g.,webpack@>=5
).react-dom@experimental
: Works best with React DOM'screateRoot
andcreateBlockingRoot
APIs, which are curently available only in the experimental builds.Browsers: Chrome, Safari 11+, Edge, Firefox, Opera, IE 11.
Installation
npm install react-gui
API
Components
The foundational components are adapted from those used in React Native today. These components can adopt behaviors by linking refs to the event and interaction hooks.
APIs
Interactions
High-level interactions that simplify working with accessible behaviors across devices and platforms. These hooks (and the underlying event hooks) make it easy to work with pointer gestures, keyboard interactions, and layout changes to adjust a component's render tree and styles. The interaction hooks cause a component to update when their return value changes (if this is not desired, use the event hooks).
- useFocus
- useFocusVisibility
- useFocusWithin
- useHover
- useInteractOutside
- useKeyboard
- useLayout
- useModality
- usePan
- usePress
- useResponder
Other hooks
Imperative methods
Methods for working imperatively with host elements.
Unstable DOM APIs
These unstable APIs are the DOM-specific abstractions used to create the built-in, platform-agnostic APIs.
Other
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
8 years ago