Skip to main content

TextArea

Example

import { components } from "replugged";
const { FormItem, TextArea } = components;

export function Settings(): React.ReactElement {
return (
<FormItem title="Foo">
<TextArea {...util.useSetting(cfg, "foo", "bar")} />
</FormItem>
);
}

Props

NameTypeDefaultDescription
allowOverflowbooleanfalseWhether the input can exceed the maximum length
autoFocusbooleanfalseWhether the input is on focus
autosizebooleanfalseWhether the input can automatically set its size
classNamestringComponent class name
disabledbooleanfalseWhether the input is disabled
errorstringError message displayed if length exceeds limits
flexbooleanfalseWhether the input is flexible
idstringInput element id
inputRefRef<HTMLInputElement>Input ref
maxLengthnumberValue maximum length
minLengthnumberValue minimum length
namestringInput element name
onBlurFocusEventHandler<HTMLInputElement>Function ran on focus loose
onChange(value: string) => voidFunction ran on value change
onFocusFocusEventHandler<HTMLInputElement>Function ran on focus
onInvalidFormEventHandler<HTMLInputElement>Function ran on invalid submission
onKeyDownKeyboardEventHandler<HTMLInputElement>Function ran on key press
placeholderstringInput placeholder text
requiredbooleanfalseWhether the input completion is required
resizeablebooleanfalseWhether the input can be resized
rowsnumber3Define the number of rows the input has
showCharacterCountbooleanfalseWhether the character count is shown
showRemainingCharacterCountbooleanfalseWhether the remaining character count is shown; works together with maxLength
spellCheckbooleanfalseWhether the input has spell check
valuestringInput value