# Upstage Design System — Textarea (product)
- context: product · group: forms
- source revision: lift-1.2.3 (Lift 1.2.3, zip sha256 8d5d9377c2b4…)
- status: content source-derived · availability implemented · verification static-only
- human docs: /ko/components/product/textarea/ · machine doc: /agent/components/product/textarea.md
## Required references (read these)
- /components/forms/Textarea.jsx — implementation · sha256 5382f78c963b…
- /components/_types.d.ts — api · key TextareaProps
- /components/forms/Textarea.prompt.md — usage-note · sha256 197f077c5bf2…
- /kit/rules/a11y-contract.json — a11y · key Textarea
## API (components/_types.d.ts TextareaProps)
- rows?: number (default 4)
- invalid?: boolean (default false)
- disabled?: boolean (default false)
- autoGrow?: boolean (default false)
- maxLength?: number
- showCount?: boolean (default false)
- value?: string
- defaultValue?: string
- onChange?: (e: any) => void
- placeholder?: string
- style?: React.CSSProperties
- extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> (other props pass through)
## Accessibility contract
- keys: -
- aria: aria-invalid, aria-describedby(counter)
- notes: 카운터는 aria-live=polite
## Unverified
- Browser behaviour is not verified here (static source check only).
지원 환경
Lift 1.2.3 의 참조 구현은 React 18 함수 컴포넌트다. 스타일은 인라인이고 색은 Product 토큰(hsl(var(--*)))을 참조하므로 styles.product.css 가 로드돼 있어야 한다. npm 패키지와의 대응은 이 저장소에서 확인하지 못했다.
API
components/_types.d.ts 의 TextareaProps 를 그대로 옮겼다.
| prop | type | default | doc |
|---|---|---|---|
rows | number | 4 | |
invalid | boolean | false | |
disabled | boolean | false | |
autoGrow | boolean | false | |
maxLength | number | — | |
showCount | boolean | false | |
value | string | — | |
defaultValue | string | — | |
onChange | (e: any) => void | — | |
placeholder | string | — | |
style | React.CSSProperties | — |
이 밖의 prop 은 Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "size"> 에서 그대로 전달된다.
코드
가져오기 한 줄과 사용 지침 원문의 예시 코드다.
import { Textarea } from "./components/forms/Textarea.jsx";<Textarea autoGrow placeholder="시스템 프롬프트" maxLength={2000} showCount />
<Textarea invalid rows={3} defaultValue="잘못된 JSON" />토큰 연결
구현 파일이 var() 로 직접 참조하는 토큰. 조건에 따라 이름을 조립하는 토큰(예: --state-${tone}-fg)은 빠진다.
--background, --destructive, --destructive-text, --disabled, --disabled-border, --disabled-foreground, --duration-fast, --focus-ring-width, --font-sans, --foreground, --input, --input-active, --input-focus-ring-width, --input-hover, --muted-foreground, --ring, --text-c1
출처
components/forms/Textarea.jsximplementation · sha256 5382f78c963b…components/_types.d.tsapi · TextareaPropscomponents/forms/Textarea.prompt.mdusage-note · sha256 197f077c5bf2…kit/rules/a11y-contract.jsona11y · Textarea