Overview
TextArea is a single surface driven by shared field tokens and size-specific padding and min-height values.
Public CSS Variables
| Variable | Value | Affects |
|---|---|---|
| min-height baselineroot | No visible change in this state | |
| border-radius ratioroot | No visible change in this state | |
| default surfaceroot | No visible change in this state | |
| hover surfaceroot | No visible change in this state | |
| focus outlineroot | No visible change in this state | |
| error outlineroot | No visible change in this state |
Part-Level Variables
Root
The root sets size-specific padding, type scale, min height, and state colors.
State And Variant Interaction
data-sizemaps to spacing and typographydata-full-width='true'setswidth: 100%data-error='true'switches the outline to error color- disabled state changes both foreground and surface tokens
Examples
Sizes
Each size sets padding, type scale and the minimum height; rows can still make the field taller. fullWidth stretches it to the container.
textarea-sizes.tsx · 20 lines
import { TextArea } from '@vega-ui/react';
const SIZES = ['sm', 'md', 'lg'] as const;
export default function TextareaSizes() {
return (
<div style={{ display: 'grid', gap: 'var(--spacing-6)', width: '100%' }}>
{SIZES.map((size) => (
<TextArea
key={size}
size={size}
rows={2}Do Not Override
- making placeholder and entered text visually indistinguishable
- overriding disabled styling so the field still looks editable