@use-platform/react
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-rc.dc945ca.7 • Public • Published

storybook npm

⚠️⚠️ At the moment, the project is under active development and has been subjected to major changes. ⚠️⚠️

Motivation

Develop interfaces quickly with accessibility and the same work in all environments.

Installation

npm i -PE @use-platform/react

Usage

All hooks available from root public API. More examples you can find in storybook.

import { useButton } from '@use-platform/react'
import { useRef } from 'react'

export const Button = (props) => {
  const { children } = props
  const buttonRef = useRef(null)
  const { buttonProps } = useButton(props, buttonRef)
  return (
    <button {...buttonProps} ref={buttonRef}>
      {children}
    </button>
  )
}

Terminology

Semantic

Semantic hooks implements behavior of component and sets aria-attributes to ensure accessibility.

State

State hooks contains the local state of the component and allow you to use component in different contexts (e.g. SingleCalendar, RangeCalendar).

Interactions

Interactive hooks uses to ensure correct interaction with interface in any environment (e.g. web, touch, tv).

Roadmap

Approximate work plan (may be adjusted) Q3-Q4:

License

This project develop under MPL-2.0 license.

Readme

Keywords

none

Package Sidebar

Install

npm i @use-platform/react

Weekly Downloads

12

Version

1.0.0-rc.dc945ca.7

License

MIT

Unpacked Size

599 kB

Total Files

819

Last publish

Collaborators

  • stenin
  • axaxaman
  • tadatuta
  • yarastqt