Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Allow markup in Input labels #583

@igorsantos07

Description

@igorsantos07

In short, the Input label should accept either the usual label prop or also a slot named label, so we can use markup inside the label.

<Input type="switch" bind:checked={doomed}>
  <svelte:fragment slot="label">
    I agree with the <a href="/boring-terms">Terms & Conditions</a> without reading them
  </svelte:fragment>
</Input>

Also, to avoid spamming the repo with issues: <Label check/> yields class="form-label form-label-check", where the first class is unnecessary and creates extra bottom-margin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: LowBug, issue, or pull request is a P3Severity: LowBug or issue is of low severityType: BugSomething isn't workingType: ProposalIssue or pull requests contains a new proposal

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions