angular / angular/components

mat-radio-button and mat-checkbox don't line wrap

Open
#10,954 10 comments 18 reactions 0 assignees View on GitHub
area: material/checkbox area: material/radio G P4
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

#### Bug, feature request, or proposal:

Proposal: change `` or `` to line-wrap its contents by default or add an option.

#### What is the expected behavior?

I can put a text into a `` or `` that is longer than what fits into the viewport.

#### What is the current behavior?

The content in a or does not line wrap. If you have a lot of text in a it gets cut at the end.

A workaround would be
`{{mylongtext}}`

#### What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-uaeetd?file=app/app.component.html

#### What is the use-case or motivation for changing an existing behavior?

I have a pretty narrow window and need to put checkboxes and radio buttons in there.

#### Which versions of Angular, Material, OS, TypeScript, browsers are affected?

I think all of them.

#### Is there anything else we should know?

Contributor guide

Open the contributing guide

Research direction

Start with the linked StackBlitz reproduction, specifically app/app.component.html, and verify the lack of wrapping for long mat-radio-button and mat-checkbox content in a narrow viewport. Done means the content wraps by default or through a documented option, while preserving the components' existing behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.