rio-labs / rio

WebApps in pure Python. No JavaScript, HTML and CSS needed
https://rio.dev
Apache License 2.0
453 stars 14 forks source link

Add `anchor` Attribute to `rio.Slider` Component #45

Open Sn3llius opened 4 weeks ago

Sn3llius commented 4 weeks ago

It would be beneficial to enhance the rio.Slider component by introducing an additional attribute called anchor?. This attribute will accept a Literal type with values "left" or "right", defaulting to "left". This feature will make the rio.Slider more versatile and allow developers to specify the anchor position of the slider.

Benefits:

Proposed API:

class Slider(FundamentalComponent):
    def __init__(self, ..., anchor: Literal["left", "right"] = "left"):

rio.Slider(..., anchor = "left") or rio.Slider(...): image

rio.Slider(anchor = "right"): image

Additional Context: