Skip to main content
Mantı UI logoMantı UIv0.12.1
Studio

Textarea

Textarea accepts native attributes and wires label, helper text, error text, and ARIA relationships.

import { Textarea } from '@manti-ui/react';

export default function TextareaBasic() {
  return (
    <div className="w-full max-w-[calc(var(--manti-space-16)*6)]">
      <Textarea
        label="Recipe notes"
        placeholder="Add preparation notes"
        description="Shown below the field while there is no error."
      />
    </div>
  );
}

Appearance and state

Use variant="fill" for a neutral filled control. Set autoResize to grow with content and maxHeight to cap it.

requiredIndicator={null} hides only the visual marker. Use focusRing="none" when an outer product shell owns focus styling.

Please add at least three sentences.

API

PropTypeDefaultDescription
labelReactNodeField label, associated with the textarea.
hintReactNodeHelper text shown below the control when there is no error.
descriptionReactNodeAlias for hint, useful for textarea helper copy.
errorReactNodeError message. Presence sets the invalid state and replaces helper text.
size'sm' | 'md' | 'lg''md'Control size.
variant'default' | 'fill''default'Visual treatment for the control.
fullWidthbooleanStretch to fill the available inline space.
rowsnumber3Initial textarea height in text rows.
autoResizebooleanGrow the textarea to fit its content.
maxHeightCSSProperties["maxHeight"]Maximum height used with autoResize or native scrolling.
resize'none' | 'vertical''vertical'Native resize affordance.
requiredIndicatorReactNode | null'*'Visual marker for required fields. Null hides only the marker.
focusRing'control' | 'none''control'Choose whether the Manti control owns visible focus.
...restTextareaHTMLAttributesAny native textarea attribute (placeholder, value, onChange, maxLength, disabled, required...).

Styling

Anatomy

PartSelectorDescription
root[data-scope="field"][data-part="root"]The field container.
label[data-scope="field"][data-part="label"]The field label.
required[data-scope="field"][data-part="required"]The required asterisk (when required).
control[data-scope="field"][data-part="control"]The textarea frame.
input[data-scope="field"][data-part="input"]The native textarea.
hint[data-scope="field"][data-part="hint"]Helper text below the control.
error[data-scope="field"][data-part="error"]Error message below the control (when error).

Textarea and Input share the field scope.

Tokens

TokenControls
--manti-field-heightheight
--manti-field-padding-xpadding x
--manti-field-padding-ypadding y
--manti-field-font-sizefont size
--manti-field-addon-padding-xaddon padding x

Last updated

Built end-to-end with Manti UI components and design tokens. Manti UI is a framework-agnostic design system on Zag.js.

GitHub