Skip to content

Add label propery to FormCotrol #285

@kstepien3

Description

@kstepien3

Form controls can use label propery.

readonly label = input<string>();
readonly id = input<string>(crypto.randomUUID(), { alias: 'for' }); // `id` or `inputId`? 

It wouldn't work in textarea. It probably needs more extra logic to dynamically render label next to the textarea component

Something like this might be nice:
https://stackoverflow.com/a/45085659

Expected behavior:

<zen-checkbox label="TEXT" />
<zen-input label="TEXT" />
<zen-switch label="TEXT" />
<textarea zen-textarea label="TEXT"></textarea>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestto verifyNeeds more investigation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions