role textarea
Textarea draft v0.1.0
Lets people enter or edit several lines of text.
A textarea collects free text that may run over several lines: a message, a description, a comment, an address. It shows a chosen number of lines, scrolls beyond them and can be resized. It has a visible label above, an optional description and, when its value fails validation, an error message under it. One line of text is a Text field.
Tokens
From packages/tokens/src/components/textarea.tokens.json. Path grammar: textarea.<part>.<property>[.<option>][.<state>]. Every value aliases a semantic token.
No token matches.
Part container (1)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
textarea.container.gap
Between the label, the control, the description and the error message.
|
dimension |
{space.4}
|
4px
|
--textarea-container-gap
|
Part label (3)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
textarea.label.color.default
|
color |
{global.text.on-base.neutral.primary}
|
light
#0E0D0D
dark
#D2CECF
|
--textarea-label-color-default
|
textarea.label.color.disabled
|
color |
{global.text.state.disabled.default}
|
light
#8C8C8C
dark
#9D9B9Cb2
|
--textarea-label-color-disabled
|
textarea.label.typography
|
typography |
{body.family}{body.size.sm}{body.weight.medium}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":14,"unit":"px"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--textarea-label-typography-font-family--textarea-label-typography-font-size--textarea-label-typography-font-weight--textarea-label-typography-line-height--textarea-label-typography-letter-spacing
|
Part control (30)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
textarea.control.min-height.small
|
dimension |
{space.32}
|
32px
|
--textarea-control-min-height-small
|
textarea.control.min-height.medium
|
dimension |
{space.40}
|
40px
|
--textarea-control-min-height-medium
|
textarea.control.min-height.large
|
dimension |
{space.48}
|
48px
|
--textarea-control-min-height-large
|
textarea.control.padding-inline.small
|
dimension |
{space.8}
|
8px
|
--textarea-control-padding-inline-small
|
textarea.control.padding-inline.medium
|
dimension |
{space.12}
|
12px
|
--textarea-control-padding-inline-medium
|
textarea.control.padding-inline.large
|
dimension |
{space.16}
|
16px
|
--textarea-control-padding-inline-large
|
textarea.control.border-radius
|
dimension |
{corner-radius.xs}
|
4px
|
--textarea-control-border-radius
|
textarea.control.border-width
|
dimension |
{stroke-width.sm}
|
0.6px
|
--textarea-control-border-width
|
textarea.control.background.default
|
color |
{global.bg.level.0.default}
|
light
#FDFDFD
dark
#191919
|
--textarea-control-background-default
|
textarea.control.background.hover
|
color |
{global.bg.level.0.hover}
|
light
#F7F6F6
dark
#212121
|
--textarea-control-background-hover
|
textarea.control.background.readonly
|
color |
{global.bg.level.1.default}
|
light
#F7F6F6
dark
#212121
|
--textarea-control-background-readonly
|
textarea.control.background.disabled
|
color |
{global.bg.state.disabled.default}
|
light
#B6B4B41a
dark
#7676764d
|
--textarea-control-background-disabled
|
textarea.control.border-color.default
|
color |
{global.border.accent.neutral.default}
|
light
#323031
dark
#B9B7B7
|
--textarea-control-border-color-default
|
textarea.control.border-color.invalid
|
color |
{global.border.base.functional.error.default}
|
light
#C01619
dark
#E12A23
|
--textarea-control-border-color-invalid
|
textarea.control.border-color.disabled
|
color |
{global.border.state.disabled.default}
|
light
#B6B4B466
dark
#363636b2
|
--textarea-control-border-color-disabled
|
textarea.control.color.default
|
color |
{global.text.on-base.neutral.primary}
|
light
#0E0D0D
dark
#D2CECF
|
--textarea-control-color-default
|
textarea.control.color.disabled
|
color |
{global.text.state.disabled.default}
|
light
#8C8C8C
dark
#9D9B9Cb2
|
--textarea-control-color-disabled
|
textarea.control.placeholder-color.default
|
color |
{global.text.on-base.neutral.tertiary}
|
light
#616161
dark
#9D9B9C
|
--textarea-control-placeholder-color-default
|
textarea.control.placeholder-color.disabled
|
color |
{global.text.state.disabled.default}
|
light
#8C8C8C
dark
#9D9B9Cb2
|
--textarea-control-placeholder-color-disabled
|
textarea.control.typography.small
|
typography |
{body.family}{body.size.sm}{body.weight.regular}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":14,"unit":"px"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--textarea-control-typography-small-font-family--textarea-control-typography-small-font-size--textarea-control-typography-small-font-weight--textarea-control-typography-small-line-height--textarea-control-typography-small-letter-spacing
|
textarea.control.typography.medium
|
typography |
{body.family}{body.size.md}{body.weight.regular}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":16,"unit":"px"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--textarea-control-typography-medium-font-family--textarea-control-typography-medium-font-size--textarea-control-typography-medium-font-weight--textarea-control-typography-medium-line-height--textarea-control-typography-medium-letter-spacing
|
textarea.control.typography.large
|
typography |
{body.family}{body.size.lg}{body.weight.regular}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":20,"unit":"px"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--textarea-control-typography-large-font-family--textarea-control-typography-large-font-size--textarea-control-typography-large-font-weight--textarea-control-typography-large-line-height--textarea-control-typography-large-letter-spacing
|
textarea.control.outline-width.focus-visible
|
dimension |
{focus.ring.width}
|
2.4px
|
--textarea-control-outline-width-focus-visible
|
textarea.control.outline-offset.focus-visible
|
dimension |
{focus.ring.offset}
|
4px
|
--textarea-control-outline-offset-focus-visible
|
textarea.control.outline-color.focus-visible
|
color |
{color.focus.ring}
|
light
#175DD6
dark
#9EE7FA
|
--textarea-control-outline-color-focus-visible
|
textarea.control.transition.duration
|
duration |
{duration.fast}
|
150ms
|
--textarea-control-transition-duration
|
textarea.control.transition.easing
|
cubicBezier |
{easing.standard}
|
cubic-bezier(0.2, 0, 0, 1)
|
--textarea-control-transition-easing
|
textarea.control.padding-block.small
|
dimension |
{space.6}
|
6px
|
--textarea-control-padding-block-small
|
textarea.control.padding-block.medium
|
dimension |
{space.8}
|
8px
|
--textarea-control-padding-block-medium
|
textarea.control.padding-block.large
|
dimension |
{space.12}
|
12px
|
--textarea-control-padding-block-large
|
Part description (3)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
textarea.description.color.default
|
color |
{global.text.on-base.neutral.secondary}
|
light
#323031
dark
#B9B7B7
|
--textarea-description-color-default
|
textarea.description.color.disabled
|
color |
{global.text.state.disabled.default}
|
light
#8C8C8C
dark
#9D9B9Cb2
|
--textarea-description-color-disabled
|
textarea.description.typography
|
typography |
{body.family}{body.size.sm}{body.weight.regular}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":14,"unit":"px"},"fontWeight":400,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--textarea-description-typography-font-family--textarea-description-typography-font-size--textarea-description-typography-font-weight--textarea-description-typography-line-height--textarea-description-typography-letter-spacing
|
Part error-message (2)
| Token | Type | Value | Resolved | CSS |
|---|---|---|---|---|
textarea.error-message.color
|
color |
{global.text.on-base.functional.error.default}
|
light
#E12A23
dark
#EE5248
|
--textarea-error-message-color
|
textarea.error-message.typography
|
typography |
{body.family}{body.size.sm}{body.weight.medium}{font.line-height.normal}{font.letter-spacing.normal}
|
{"fontFamily":"Inter","fontSize":{"value":14,"unit":"px"},"fontWeight":500,"lineHeight":1.5,"letterSpacing":{"value":0,"unit":"px"}}
|
--textarea-error-message-typography-font-family--textarea-error-message-typography-font-size--textarea-error-message-typography-font-weight--textarea-error-message-typography-line-height--textarea-error-message-typography-letter-spacing
|