JSPM

@instructure/ui-focusable

7.4.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3570
  • Score
    100M100P100Q154723F
  • License MIT

A utility used to identify when an element receives focus.

Package Exports

  • @instructure/ui-focusable

Readme


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 @instructure/ui-focusable

Usage

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

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