guilhermerodz / input-otp

One time passcode Input. Accessible & unstyled.
https://input-otp.rodz.dev
MIT License
2.35k stars 47 forks source link

feat: RTL support #26

Closed vltansky closed 5 months ago

vltansky commented 5 months ago

pretty small fix for RTL support by just enforcing it to be LTR as numbers anyway always written left to right.

vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
rodz-input-otp ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 13, 2024 9:43am
guilhermerodz commented 5 months ago

hi @vltansky i would love to add support for RTL, yet I don't know what's a good example for this.

this PR does not affect the input's behavior. also, please notice the source code is located at packages

can you provide more details on what is the expected behavior when it comes to rtl?

Current behavior is ltr but not specified at CSS level.

vltansky commented 5 months ago

Hi, I've added an example to switch to RTL/LTR in the demo website. Also, I've added the style in the right place, my bad :)

before: https://share.cleanshot.com/9mpvmwsr

after: https://share.cleanshot.com/yX8bjvt8

it should behave just the same as LTR.

guilhermerodz commented 5 months ago

hi @vltansky I'm still not sure how to achieve the behavior you mentioned.

can you provide me with a preview/link?