diff --git a/README.md b/README.md index b512b1f..2238538 100644 --- a/README.md +++ b/README.md @@ -1 +1,113 @@ -# react-refocus \ No newline at end of file + +
Ensure focus remains within a specified component, enhancing interactions for modals, dialogs, and overlays.
+ +### 🔄 Focus Restoration +Automatically return focus to a previously focused element after actions like closing a modal or a dialog.
+ +### 🧭 Focus Order Management +Dynamically manage and adjust the tab order of elements in the UI layout.
+ +### ✅ Keyboard Navigation +Improve keyboard navigation within complex UI components like menus, dropdowns, and lists.
+ +### 🎨 Custom Focus Indicators +Easily customize focus indicators with various styles and animations to match your design.
+ +### 👁️ Focus Visibility +Differentiate between keyboard and mouse focus using the :focus-visible state.
+ +### ⚡️ Auto Focus +Automatically set focus on any element when components mount.
+ +### 📢 Screen Reader Announcements +Improve accessibility by announcing focus changes to screen readers.
+ +### 🚀 High Performance +Built for high performance with a minimal footprint.
+ + +## Installation + +To install the React Refocus library, use the following command: + +```bash +npm install react-refocus +``` + +Alternatively, if you use Yarn: + +```bash +yarn add react-refocus +``` + +## Getting Started + +```javascript +import { FocusTrap } from 'react-refocus'; + +const MyComponent = () => ( +