werkbank
    Preparing search index...
    • A textarea component that automatically resizes based on its content.

      Type Parameters

      • Schema extends BaseSchema<any, any, any>

      Parameters

      Returns Element

      The rendered textarea element.

      This component integrates with useInputValidation for validation and useResize to handle dynamic resizing. It expands vertically as the user types, up to a specified maxBlockSize.

      import { string, maxLength } from 'valibot';
      import { Textarea } from './textarea';

      const bioSchema = string([maxLength(500)]);

      function BioField() {
      return (
      <Textarea
      name="bio"
      placeholder="Tell us about yourself"
      validate={bioSchema}
      minRows={3}
      maxBlockSize={300}
      />
      );
      }