category: packages
ui-focusable
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>
)
}