-
Notifications
You must be signed in to change notification settings - Fork 21
Description
The problem
I'd like a variant of PharosSelect with the label positioned to the left of the element rather than above it. Currently, achieving this layout requires writing custom CSS selectors, and overriding the bottom margin on the label becomes problematic and inconsistent.
The solution
Add support for a left-positioned label variant in Pharos components (specifically PharosSelect). This would allow consumers to specify label placement without needing custom CSS overrides that may conflict with the component's internal styling.
Alternatives considered
Workaround using hideLabel with a faux label: Hide the native label using the hideLabel prop (which still provides an accessible name) and render a separate visual label element adjacent to the component. This approach works but introduces redundant content in the DOM.
Additional information
The current workaround is not ideal for production use due to the redundant content issue. A native solution in Pharos would provide a cleaner implementation path and ensure consistent behavior across consuming applications.