99.10.0 • Published 4 years ago

@temporg/ui-focusable v99.10.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

category: packages

ui-focusable

npm  build-status  MIT License  Code of Conduct

A utility used to identify when an element receives focus.

Components

The ui-focusable package contains the following:

Installation

yarn add @temporg/ui-focusable

Usage

import React from 'react'
import { Focusable } from '@temporg/ui-focusable'

const MyFocusableElement = () => {
  return (
    <Focusable>
    {({ focused }) => (
      <FocusableView focused={focused}>
        Hello! Focus me!
      </FocusableView>
    )}
    </Focusable>
  )
}