Textarea
Text inputs enable the user to interact with data.
Anatomy
import { Textarea } from "@lualtek/react-components";
export default () => {
return <Textarea label="Sample label" />;
};
API Reference
export type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
/**
* Define the accessible label of the textarea. While this is not
* mandatory, an textarea should always have a label. If not using this property
* you can bind a custom label to the textarea by using an id.
*/
label: string;
/**
* Set the field into a readonly state. When readonly, the field value
* cannot be edited but it can still be selected and copied.
*/
readOnly?: boolean;
/**
* Set the field into a disabled state. When disabled, the field value cannot be
* edited, selected or copied, but it can still be focused and navigated by AT.
* @default false
*/
disabled?: boolean;
/**
* The callback function that is called when the textarea value changes.
*/
onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
/**
* Make the textfield full width, filling the available space.
*/
fullWidth?: boolean;
};