Command palette

@yasinsensoy/native

React Native · Components

Textarea

Multi-line text field: label, description, error and the same appearances as fields on web.

2 exports

Live example

The preview runs in the browser with the web component; the native component takes the same props and looks the same on iOS and Android.

Preview

Code

import { Textarea } from "@yasinsensoy/native";

<Textarea autoResize placeholder="Grows as you type" />

Events

  1. Events appear here when you interact with the preview.

Import

import { Textarea } from "@yasinsensoy/native";

Textarea

component

Multi-line text field: label, description, error and the same appearances as fields on web. Same line height and padding on both platforms.

Textarea(props: TextareaProps): ReactElement<unknown, string | JSXElementConstructor<any>>

Examples

<Textarea label="Your message" rows={4} />
<Textarea label="Note" autoResize maxRows={8} maxLength={500} />

TextareaProps

interface

Textarea props.

Extends: FieldProps, Omit<TextInputProps, "editable" | "style" | "multiline">

NameTypeDefaultDescription
ref?Ref<TextInputRef>Ref of the underlying native element.
variant?FieldVariant"outline"Appearance. See FieldVariant.
rows?number3Number of visible rows (minimum height).
autoResize?booleanfalseHeight grows with content (up to maxRows).
maxRows?numberMaximum rows with autoResize; then it scrolls inside.
readOnly?booleanRead-only.
style?StyleProp<ViewStyle>Style of the box.