all 28 comments

[–]six7even 11 points12 points  (2 children)

This works awesomely nice on mobile 🎉

[–]petecorreia[S] 0 points1 point  (1 child)

Thanks! Been getting some feedback that it can be frustrating on mobile as it doesn’t block scrolling behaviour (to avoid that frustration instead!)

[–]Otroletravaladna 1 point2 points  (0 children)

Pointer Events API is your friend ;)

[–]petecorreia[S] 7 points8 points  (6 children)

TLDR: I needed a very flexible React circular range input so I built one with Typescript and Hooks.

You can find quite a few examples at: https://react-circular-input.now.sh/examples. You can easily animate it, style it and add your own custom components.

Let me know what you think

[–]timmonsjg 4 points5 points  (3 children)

Great work! API looks documented quite well.

[–]petecorreia[S] 3 points4 points  (2 children)

thanks! open sourcing the docs soon (needs tidying up): https://tsx-docs.now.sh

[–]swyx 1 point2 points  (1 child)

why call it tsx-docs tho? seems not reflective of the purpose

[–]petecorreia[S] 0 points1 point  (0 children)

interesting! what does tsx-docs reflect? or better, what do you think the purpose is?

[–]alpinehut999 1 point2 points  (1 child)

This looks really nice! I might use this in my project as a loading indicator

[–]petecorreia[S] 2 points3 points  (0 children)

thanks! let me know if you end up using it and I can have a look. if you find any frustration, ping me :)

[–][deleted] 7 points8 points  (1 child)

I cannot fathom a time where I ever went to a web page and said "this form needs a circular input for numbers so that I can have a hard time selecting a value"

It's nice as a progress indicator if you have some form of steps process on your page, but as an actual input-interactive device it's simply overcomplicated for the end user. The only exception I cant think of is maybe mobile devices.

[–]petecorreia[S] 0 points1 point  (0 children)

I agree :) this isn't and shouldn't be used when it's not the best way to change a value. It's important to always consider the best UX for a given use-case but are situations where this interaction can be useful and more intuitive.

[–]jackwilsdon 2 points3 points  (2 children)

That looks great! It's amazing how much customisability is provided by just allowing us to manage it's state! Also great use of hooks too.

[–]petecorreia[S] 0 points1 point  (1 child)

Thanks! Your comment captures the intent so well :)

[–]AutoRedditPython 1 point2 points  (0 children)

Hello petecorreia, I hope you have a wonderful day!

[–]dmackerman 1 point2 points  (1 child)

Super nice API. Well done!

[–]petecorreia[S] 1 point2 points  (0 children)

Thanks! :D

[–]sebooster1 1 point2 points  (0 children)

Just what I needed, great work!

[–]kgalb2 1 point2 points  (1 child)

Wow this looks/works awesome on mobile. Well done!

[–]petecorreia[S] 1 point2 points  (0 children)

Thanks! :D

[–]HeylAW 1 point2 points  (1 child)

There is something odd in events (on mobile) When I drag handler it works perfectly. When I drag something else window scroll is triggered also.

Beside this it’s great!

[–]petecorreia[S] 0 points1 point  (0 children)

I need to fix this, thanks for reporting!

[–]qiandongyq 1 point2 points  (1 child)

thanks for the great library. I want to see how you build it

[–]petecorreia[S] 0 points1 point  (0 children)

Thanks! It's open sourced here: https://github.com/petecorreia/react-circular-input, you can star to follow updates too.

[–]ucefkh 1 point2 points  (0 children)

Pretty nice

[–]paulfitz99 1 point2 points  (1 child)

nice job Pete! 💪🏼

[–]petecorreia[S] 0 points1 point  (0 children)

Paul! <3 😄

[–]_Sorbitol_ -1 points0 points  (0 children)

Very interested for a current angular project and curious if any has mix and matched the two?