Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

[RFC] Naming of <Label> and <label> relative to an Input component #201

Open
@brianespinosa

Description

@brianespinosa

Feature Request

Problem description

Inside of an Input component we have the concept of a Label component which attaches to the front or back of an input. This is different than the native <label> which appears above an input (or to the left if the input is inline). This leads to confusion for the user, especially when using the shorthand API. When I set something as the label prop, am I setting the html lowercase <label> or am I passing attributes to a Label component.

Proposed solution

I think we should rename the Label component itself, relative to Inputs. This is going to reduce confusion in both discussion and semantics, but also simplify how be define these elements in the shorthand API.

Bootstrap calls these elements addons. That might be a good place to start. They also have the concept of prepend/append for positioning. I think we could just use addonPosition and "before"||"after"

Any other naming suggestions welcomed. I feel like it is early enough on that any challenges to be addressed in this name change can be handled fairly easily.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions