Skip to content

Select: Left-positioned label variant #1172

@tim-ithaka

Description

@tim-ithaka

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.

Image

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions