padix
TypeScript icon, indicating that this package has built-in type declarations

0.0.1 • Public • Published

padix 🕹️

License: MIT

A coordinate driven input component for react that supports keyboard events

Install

# pnpm (recommended)
pnpm install padix

# npm 
npm install padix

# yarn
yarn install padix

Usage

import * as Padix from 'padix'

export function Example () {
  /* Coordinates will always be a normalized value between 0 and 1 */
  const [coordinates, setCoordinates] = useState({ x: 0.5, y: 0.5 })

  return (
    <Padix.Root 
      value={coordinates} 
      onChange={setCoordinates} 
      style={{
        width: 300,
        height: 300
      }}
    >
      {/* Describe labels */}
      <Padix.Label position={'top'}>{'Top Label'}</Padix.Label>
      
      {/* Apply custom class names or styles to the thumb element */}
      <Padix.Thumb style={{ backgroundColor: 'rebeccapurple' }} />
    </Padix.Root>
  )
}

Readme

Keywords

Package Sidebar

Install

npm i padix

Weekly Downloads

4

Version

0.0.1

License

MIT

Unpacked Size

53.5 kB

Total Files

9

Last publish

Collaborators

  • zachkrall