# styled-components-rtl

> Allows u add ltr-rtl direction switching for your styled components

Latest version **5.2.0** (published 2021-02-12) · ISC license · 0 weekly downloads

## Install

```sh
npm install styled-components-rtl
pnpm add styled-components-rtl
yarn add styled-components-rtl
bun add styled-components-rtl
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 5.2.0 |
| Published | 2021-02-12 |
| First published | 2019-09-16 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 8 |
| Author | Kirill Kubryakov |
| Maintainers | maxkudla |
| Keywords | react, styled-components, rtl |

## Links

- npm: https://www.npmjs.com/package/styled-components-rtl
- Repository: https://github.com/maxkudla/styled-components-rtl
- Homepage: https://github.com/maxkudla/styled-components-rtl#readme
- Issues: https://github.com/maxkudla/styled-components-rtl/issues
- npm.io page: https://npm.io/package/styled-components-rtl

## Dependencies (2)

- [cssjanus](https://npm.io/package/cssjanus.md) ^1.3.2
- [styled-components](https://npm.io/package/styled-components.md) ^5.2.0

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 5.2.0 (latest) — 2021-02-12
- 5.0.1 — 2020-04-16
- 4.3.2 — 2020-04-16
- 0.0.4 — 2020-03-10
- 0.0.3 — 2020-03-06
- 0.0.2 — 2019-09-16
- 0.0.1 — 2019-09-16

## README

# styled-components-rtl
Allows u add ltr-rtl direction switching for your styled components

## Using
```
import {ThemeProvider} from "styled-components"
import rtl from "styled-components-rtl";

const List = styled.div``;
const ListItem = styled.div`
    ${rtl`
        margin-left: 1rem;
    `}
`;

const theme = {
  dir: "rtl"
  // OR direction: "rtl"
};

render(
  <ThemeProvider theme={theme}>
    <List>
      <ListItem>Item 1</ListItem>
      <ListItem>Item 2</ListItem>
    </List>
  </ThemeProvider>
);
```

If `theme.dir` equal **rtl** instead of `margin-left` will be `margin-right`;

## Contributors

Thanks goes to these wonderful people:

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore -->
| [<img src="https://avatars2.githubusercontent.com/u/9202221?v=4" width="100px;"/><br /><sub><b>Max Kudla</b></sub>](https://github.com/maxkudla/styled-components-rtl/commits?author=MaxKudla "Code") | [<img src="https://avatars2.githubusercontent.com/u/7778796?v=4" width="100px;"/><br /><sub><b>Anees Hikmat Abu-hamid</b></sub>](https://github.com/maxkudla/styled-components-rtl/commits?author=aneeshikmat "Code")  | [<img src="https://avatars3.githubusercontent.com/u/7444066?v=4" width="100px;"/><br /><sub><b>Omar Houmz</b></sub>](https://github.com/maxkudla/styled-components-rtl/commits?author=omhoumz "Code")  |
| :---: | :---: | :---: |
<!-- ALL-CONTRIBUTORS-LIST:END -->

---
_Source: https://npm.io/package/styled-components-rtl · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
