RFC(web-components): Shorthand components for complex field assemblies? #32001
Unanswered
davatron5000
asked this question in
Ideas
Replies: 1 comment 5 replies
-
Maybe a new element, e.g. <fluent-field label-position="after">
<label for="option-one" slot="label">Option 1</label>
<fluent-radio id="option-one" slot="input" name="demo-options" value="1"></fluent-radio>
</fluent-field> and generate the longhand structure in the light DOM? |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As part of the rollout of
elementInternals
the shape of our form field API has become a bit more verbose. Here's an example I came across...BEFORE:
AFTER:
I 100% agree with the decision to leverage
Field
and native<label>
elements (as a workaround for the platform limitations with labels). I feel that design is correct, but the authoring experience suffers a bit and creates a lot more work and manual wiring of fields, labels and IDs. It would be nice if we could provide some of these higher level authoring experiences that "generate" the<fluent-field>
code behind the scenes in the Shadow DOM.SOFT PROPOSAL:
QUESTIONS:
Beta Was this translation helpful? Give feedback.
All reactions