MYDS Logo

    MYDS

    Beta

    TextArea

    This component is a multi-line text input component designed for longer form content. Unlike the Input component which is limited to a single line, it expands vertically to accommodate multiple lines of text.

    Usage

    import { TextArea } from "@govtechmy/myds-react/textarea";
    export default () => (
      <TextArea placeholder="Placeholder text displayed when the text area is empty." 
      size={'small'} 
      disabled={false}
      />
    );

    Examples

    Size

    Controls the input field's size variant. Supports small, medium, or large.

    Disabled

    The disabled props can be used to disable user input and applies a visual styling to indicate the field cannot be edited.

    Props

    TextArea

    PropTypeDefault
    size
    enum
    medium
    disabled
    boolean
    false
    placeholder
    string
    -

    On this page