Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@charlietango/use-focus-trap

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@charlietango/use-focus-trap - npm Package Compare versions

Comparing version 1.2.10 to 1.2.11

4

CHANGELOG.md

@@ -6,2 +6,6 @@ # Change Log

## [1.2.11](https://github.com/charlie-tango/hooks/compare/@charlietango/use-focus-trap@1.2.10...@charlietango/use-focus-trap@1.2.11) (2020-06-09)
**Note:** Version bump only for package @charlietango/use-focus-trap
## [1.2.10](https://github.com/charlie-tango/hooks/compare/@charlietango/use-focus-trap@1.2.9...@charlietango/use-focus-trap@1.2.10) (2020-01-29)

@@ -8,0 +12,0 @@

4

package.json
{
"name": "@charlietango/use-focus-trap",
"description": "Trap keyboard focus inside a DOM element, to prevent the user navigating outside a modal",
"version": "1.2.10",
"version": "1.2.11",
"private": false,

@@ -41,3 +41,3 @@ "sideEffects": false,

},
"gitHead": "8bf83428b83f8104c0ccc60509b9097162f37603"
"gitHead": "f4be428c4de8f7072a4b62f2f4741c92cf48c4c8"
}

@@ -6,3 +6,3 @@ # useFocusTrap

> Checkout the [Storybook](https://ct-hooks.netlify.com/?path=/story/usefocustrap--readme) demo.
> Checkout the [Storybook](https://ct-hooks.now.sh/?path=/story/usefocustrap--readme) demo.

@@ -21,4 +21,4 @@ ## Installation

The `useFocusTrap` hook returns a `ref` that you should assign the the DOM element that should be root of the trap.
Anything outside that element, will not be able to receive focus.
The `useFocusTrap` hook returns a `ref` that you should assign to the DOM element that needs to trap focus.
Anything outside that element, will no longer be able to receive focus.

@@ -56,3 +56,3 @@ You can toggle the trap by setting the `active` boolean. By default it's activated once the `ref` is assigned.

When using this inside to create a Modal, there are a few things you need to handle:
When using this hook to create a Modal, there are still a few things you need to handle, that's outside the scope of this hook:

@@ -59,0 +59,0 @@ - Trap focus

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc