Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davidicus/use-lang-direction
A React hook that reads the HTML element's dir attribute value and any updates to that value allowing you to update your UI accordingly.
https://github.com/davidicus/use-lang-direction
Last synced: about 1 month ago
JSON representation
A React hook that reads the HTML element's dir attribute value and any updates to that value allowing you to update your UI accordingly.
- Host: GitHub
- URL: https://github.com/davidicus/use-lang-direction
- Owner: davidicus
- Created: 2020-05-08T19:44:59.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-04-04T16:29:43.000Z (over 1 year ago)
- Last Synced: 2024-07-31T07:15:48.511Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.56 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- fucking-awesome-react-hooks - `use-lang-direction`
- awesome-react-hooks-cn - `use-lang-direction`
- awesome-react-hooks - `use-lang-direction`
- awesome-react-hooks - `use-lang-direction`
README
# use-lang-direction
A React hook that reads the HTML element's `dir` attribute value and any updates to that value allowing you to update your UI accordingly.
## In Action
[CodeSandbox Demo](https://codesandbox.io/s/uselangdirection-ditky)
## Basic Usage
```JavaScript
import React from "react";
import { useLangDirection } from "use-lang-direction";const App = () => {
const langDir = useLangDirection();return (
);
};```
## License
MIT