Skip to content

[Bug]: Helper text div is present altho helperText is empty #21992

@jonathan-nagel

Description

@jonathan-nagel

Package

@carbon/react

Browser

No response

Package version

v1.105.0

React version

v19.2.5

Description

Some components have the helper text div altho the HelperText is empty (e.g. ""). In some cases this causes a minimal but undesired spacing attached below the component. I did not test all components but found those:

Found in TextInput and TextArea: Helper text div with visible spacing.

Image Image Image

Found in CheckboxGroup: Helper text div is present but does not add spacing. The additional spacing is probably not visible in this case due to the bottom padding of checkbox items. Altho the bottom padding on the last checkbox item is unnecessary.

Image

Reproduction/example

https://codesandbox.io/p/devbox/jk6z45

Steps to reproduce

Set the helperText property of a component to helperText=""
Inspect to see helper text div altho helperText is empty.

Suggested Severity

Severity 4 = Unrelated to a user task, has a workaround or does not need a workaround.

Application/PAL

No response

Code of Conduct

Metadata

Metadata

Assignees

Type

Severity

None yet

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions