Skip to content

GhostTextarea reference ​

Package: @ghostvue/themes. Status: experimental (stability policy).

Themed wrapper around headless GhostTextarea. Same behavioral props plus size. Importing it loads the default stylesheet and scopes styles to this instance. Hand-written until GHO-13 generates manifests.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
modelValuestring—NoControlled value, forwarded to the unstyled GhostTextarea.
defaultValuestring""NoInitial uncontrolled value, forwarded to the unstyled GhostTextarea.
disabledbooleanfalseNoForwards native disabled semantics to the unstyled GhostTextarea.
readonlybooleanfalseNoForwards native readonly semantics to the unstyled GhostTextarea.
invalidbooleanfalseNoForwards invalid semantics to the unstyled GhostTextarea.
requiredbooleanfalseNoForwards native required to the unstyled GhostTextarea.
rowsnumber2NoNative rows, forwarded to the unstyled GhostTextarea.
maxRowsnumber—NoAuto-resize ceiling, forwarded to the unstyled GhostTextarea.
autoResizebooleanfalseNoForwards auto-resize to the unstyled GhostTextarea.
submitOnEnterbooleanfalseNoForwards submit-on-Enter to the unstyled GhostTextarea. A consumer @keydown still runs first and can cancel it.
size'sm' | 'md' | 'lg'"md"NoControl size. The default omits data-size so CSS can treat a missing hook as md.

Emits ​

None declared.

Models ​

PropEventTypeDescription
modelValueupdate:modelValuestringv-model binding forwarded to the unstyled GhostTextarea.

Slots ​

None declared.

Exposed members ​

NameTypeDescription
elementHTMLTextAreaElement | nullThe native textarea after mount; null before mount and after unmount. Delegates to the unstyled GhostTextarea.
focus(options?: FocusOptions) => voidFocuses the native textarea when it is mounted and enabled. Delegates to the unstyled GhostTextarea.
blur() => voidRemoves focus from the native textarea when it is mounted. Delegates to the unstyled GhostTextarea.

Parts and data attributes ​

AttributeValueDescription
data-partrootThe textarea element inside the display:contents themed scope.
data-statedisabledUnavailable appearance from native disabled and data-state.
data-statereadonlyInset appearance for readonly fields.
data-stateinvalidDanger border from aria-invalid, including when readonly.

CSS variables ​

NameDescription
--ghost-elevation-1-bgField fill at rest.
--ghost-surface-fgField text color.
--ghost-text-mutedPlaceholder color.
--ghost-border-defaultResting border color.
--ghost-border-hairline-widthBorder thickness.
--ghost-border-dangerInvalid border color.
--ghost-border-focusFocused border color.
--ghost-action-disabled-bgDisabled fill.
--ghost-action-disabled-borderDisabled border color.
--ghost-action-disabled-fgDisabled text color.
--ghost-action-radiusCorner radius.
--ghost-control-size-md-padding-blockDefault block padding. sm/lg swap the matching control size tokens.
--ghost-control-size-md-padding-inlineDefault inline padding.
--ghost-control-size-md-fontDefault font size.
--ghost-type-family-sansField font family.
--ghost-type-line-normalField line height, also used as the auto-resize fallback for line-height: normal.
--ghost-focus-ring-colorOuter focus ring color.
--ghost-focus-ring-contrastInner focus ring contrast.
--ghost-focus-ring-widthFocus ring thickness.
--ghost-focus-ring-offsetFocus ring offset.

Accessibility ​

Role: textbox. APG pattern: https://www.w3.org/WAI/ARIA/apg/patterns/textbox/.

Required ARIA attributes: none.

Keyboard ​

KeyActionAutomated browser test
EnterInsert a newline. With submitOnEnter, submits the form owner instead; not while composing or read-only.Not reviewed
TabLeave the field. Native tab order.Not reviewed
Shift+EnterInsert a newline, with or without submitOnEnter.Not reviewed

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

textarea/release-notes ​

Example source

Release notes composer

Auto-resizing, readonly, and disabled GhostTextarea fields with live word count.

Release v2.14.3 notes

Published to the workspace changelog when deployment completes.

textarea/themed ​

Example source

Themed

Visual size on the @ghostvue/themes wrapper.

textarea/states ​

Example source

States

Disabled, readonly, invalid, and required fields.

textarea/auto-resize ​

Example source

Auto-resize

Grows with content until maxRows.

textarea/form ​

Example source

Form

Native form submission of the textarea value.

textarea/submit-on-enter ​

Example source

Submit on Enter

Comment composer where Enter sends and Shift+Enter adds a line, with a visible key hint and read-only while sending.

Enter to send, Shift+Enter for a new line