angular / angular/components

[FormField] Add option to allow hint to be shown only when focused

Open
#8,958 3 comments 2 reactions 0 assignees View on GitHub
area: material/form-field feature material spec P3
Dominant language
TypeScript
Stars
25k
Forks
6.8k
Avg merge
1d 8h
Merged PRs (30d)
91

Description

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

#### What is the expected behavior?
When the option is specified, the hint/helper text is hidden unless the field has focus.

#### What is the current behavior?
The hint is always displayed unless no hint is used

#### What is the use-case or motivation for changing an existing behavior?
Material Design specifications call for the hint to be either always displayed or displayed on focus only: https://material.io/guidelines/components/text-fields.html#text-fields-layout (see 'Helper text').

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

Contributor guide

Open the contributing guide

Research direction

Start at the Angular Material FormField implementation and trace how hint/helper text is currently rendered. Confirm the option's expected focused and unfocused states, then verify that the hint is hidden without focus and remains visible when focused.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.