fix(textarea): support floating labels with slotted content - #31321
Draft
brandyscarney wants to merge 10 commits into
Draft
fix(textarea): support floating labels with slotted content#31321brandyscarney wants to merge 10 commits into
brandyscarney wants to merge 10 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
brandyscarney
commented
Aug 3, 2026
| <slot name="start"></slot> | ||
| </div> | ||
| {hasOutlineFill && <div class="textarea-outline-container">{this.renderOutlineDecorations()}</div>} | ||
| <div class="textarea-start"> |
Member
Author
There was a problem hiding this comment.
I renamed the slot wrapper divs from the following:
start-slot-wrapper→textarea-startend-slot-wrapper→textarea-end
The goal was to align the naming with the wrapper elements added to Input.
This also matches our existing naming pattern with elements like input-bottom and textarea-bottom.
brandyscarney
commented
Aug 3, 2026
Member
Author
There was a problem hiding this comment.
I renamed these screenshots from textarea-slots to textarea-slot to match the folder name.
brandyscarney
commented
Aug 3, 2026
|
|
||
| configs().forEach(({ title, screenshot, config }) => { | ||
| test.describe(title('textarea: start and end slots (visual checks)'), () => { | ||
| test.describe(title('textarea: slot'), () => { |
Member
Author
There was a problem hiding this comment.
This was updated to match the folder name, following how we title other tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue number: N/A
What is the current behavior?
Textareas with a floating label and a start or end slot always display the label in the floated state, regardless of whether the textarea contains a value:
What is the new behavior?
mdspecification.Does this introduce a breaking change?
Internal DOM Structure Changes
The internal DOM structure has been modified to support floating labels with slotted start and end content. Additionally, the structure of the component has been reorganized, with some elements now grouped differently than before. This may introduce breaking changes for developers who rely on the component's internal DOM structure or apply custom styling to internal elements.
The following internal elements have been modified:
<div class="textarea-wrapper-inner"><div class="start-slot-wrapper">is now<div class="textarea-start"><div class="textarea-control">wrapper for the label and native control<div class="end-slot-wrapper">is now<div class="textarea-end">While the public API has not changed, selectors or style overrides targeting the previous markup will need to be updated to reference the new element names and their organization. If you have custom CSS targeting the internal structure of textarea, update your selectors to account for these structural changes.
Minimum Height Change
The minimum height of textarea in Material Design (
mdmode) has been increased from56pxto72px. This change ensures consistent heights across textareas regardless of thefillproperty orlabelPlacement, providing a more uniform and predictable user experience. If you were relying on textareas being56pxtall or had custom CSS based on that value, you will need to either update your styles to accommodate the new72pxheight or override it back to56pxif needed.Other information
Preview