rio
rio copied to clipboard
Add `anchor` Attribute to `rio.Slider` Component
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:
- Increased versatility of the rio.Slider component.
- Better alignment control in various UI layouts.
- Improved developer experience by providing more customization options.
Proposed API:
class Slider(FundamentalComponent):
def __init__(self, ..., anchor: Literal["left", "right"] = "left"):
rio.Slider(..., anchor = "left")
or rio.Slider(...)
:
rio.Slider(anchor = "right")
:
Additional Context:
- Ensure the default behavior remains unchanged to maintain backward compatibility.
- Update relevant documentation to reflect the new attribute and its usage.