Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

CheckboxButton centers its label and content when it is wider than its text

Closed Beginner friendly
#3,299 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
react, typescript
Domain
design, frontend

Research direction

Start at the CheckboxButton input styles, especially .flow--checkbox-button--input:has(.flow--checkbox-button--content), and compare them with the RadioButton grid styles. Reproduce the supplied CheckboxGroup example at a wider card width and verify that the label and content remain left-aligned beside the icon. Also review the related CheckboxGroup and RadioGroup card-stretch behavior if that part is included in scope.

Written by the indexing model from the issue text.

Description

Version: @mittwald/flow-react-components / flow-remote-react-components 1.1.48

What happens

A CheckboxButton with Text and Content renders its input as a grid with grid-template-areas: "icon label" ". content", but without grid-template-columns. When the button is wider than its text, for example in a CheckboxGroup with l={[1]}, the free space goes to both implicit columns. The icon column grows and label and content drift to the middle of the card.

RadioButton does not have this problem: .flow--radio-group--radio-button sets grid-template-columns: auto 1fr.

Repro

<CheckboxGroup l={[1]} m={[1]} s={[1]}>
  <Label>Features</Label>
  <CheckboxButton value="a">
    <Text>Image builds</Text>
    <Content>Builds and pushes images.</Content>
  </CheckboxButton>
</CheckboxGroup>

Expected

Label and content stay left-aligned next to the icon, like RadioButton. Adding grid-template-columns: auto 1fr to .flow--checkbox-button .flow--checkbox-button--input:has(.flow--checkbox-button--content) would fix it.

Related

In a multi-column group the cards keep their own height (ColumnLayout uses align-items: start), so cards with shorter text end up shorter than their neighbors. RadioButton in a RadioGroup has the same layout. Stretching the cards (align-self: stretch) inside CheckboxGroup and RadioGroup would give a row of equal cards.

Dominant language
TypeScript
Stars
15
Forks
4
Avg merge
1d 22h
Merged PRs (30d)
140

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from mittwald/flow

All issues in mittwald/flow

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.