You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then open: http://127.0.0.1:15000/react/components/tag-input
Related demo: packages/components/tag-input/_example/base.tsx
Steps to reproduce
Open the TagInput documentation page.
Check the basic usage demo.
Compare the first TagInput without label and the following TagInputs with label="Controlled: " / label="UnControlled: ".
Observe the vertical alignment of the left label and the tags inside the input.
Expected behavior
When label is set, the label, tags, and input content should be visually vertically centered inside the TagInput, and should align consistently with the TagInput without label.
Actual behavior
After declaring a left label, the content inside the input does not look fully vertically centered. The issue is especially noticeable when the TagInput already has tags.
In local measurement, when typing into a TagInput that already contains tags, the actual input area is vertically offset by a little over 1px from the center of the outer container / tags. The case with label but without tags is not obvious.
Environment
React: 18.3.1
Browser: Chrome / Chromium, reproduced in local development browser
OS: macOS 15.3.2
Node: v25.8.0
Additional context
I searched existing issues with keywords such as TagInput label, TagInput center, and tag-input align, but did not find a duplicate.
A possible cause may be the inline layout used by TagInput when break-line mode is active and tags exist. The vertical alignment rules for .t-input__prefix, .t-tag-input__prefix, and tags may not be fully consistent.
Activity
github-actions commentedon Jun 23, 2026
👋 @DaZuiZui,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。
DaZuiZui commentedon Jun 23, 2026
English version for reference:
tdesign-react version
1.17.1
Reproduction link
https://tdesign.tencent.com/react/components/tag-input
It can also be reproduced locally:
Then open:
http://127.0.0.1:15000/react/components/tag-inputRelated demo:
packages/components/tag-input/_example/base.tsxSteps to reproduce
labeland the following TagInputs withlabel="Controlled: "/label="UnControlled: ".Expected behavior
When
labelis set, the label, tags, and input content should be visually vertically centered inside the TagInput, and should align consistently with the TagInput withoutlabel.Actual behavior
After declaring a left
label, the content inside the input does not look fully vertically centered. The issue is especially noticeable when the TagInput already has tags.In local measurement, when typing into a TagInput that already contains tags, the actual input area is vertically offset by a little over 1px from the center of the outer container / tags. The case with
labelbut without tags is not obvious.Environment
Additional context
I searched existing issues with keywords such as
TagInput label,TagInput center, andtag-input align, but did not find a duplicate.A possible cause may be the inline layout used by TagInput when
break-linemode is active and tags exist. The vertical alignment rules for.t-input__prefix,.t-tag-input__prefix, and tags may not be fully consistent.fix(tag-input): align label content vertically (#4292)