Skip to content

Review 5183

Cindy Zhang edited this page Aug 23, 2026 · 1 revision

#5183 — feat(core): let CheckboxInput and Switch name their own label theme target

freddymeta · open · view on GitHub

Verdict: request-changes

These records predate the Review Presentation format for the most part, so the problem/solution/API/theme-target/breaking slots are only filled where the review itself carried them. Reviews from 2026-08-23 on use the full template.

The review · 2026-08-19

Thanks — a theme genuinely can't tell a checkbox label from a form label today, so this is a real gap.

I'd rather not solve it with a prop, though. layout changes nothing but the data- attribute, so a consumer can pass layout="beside" on a stacked label and the theme quietly lies. It's also not theirs to know: CheckboxInput and Switch already know they're a control row.

Could the control pass a target down instead?

<FieldLabel {...themeProps('checkbox-label')}  />

Then a theme names the thing it wants rather than knowing an encoding, nobody can set it untruthfully, and it matches how the other targets landed recently.

It also sidesteps a case this misses: Field direction="horizontal-labels" puts a label beside its control and still reports stacked, so the stacked bottom margin lands on it — I applied it in Chrome and those labels drift off their inputs.

[Reviewed by Robohands, edited by the maintainer]

Clone this wiki locally