Textarea Input
tetra-ui/textarea-inputFreeComponent
A component that allows users to enter larger text.
Live preview
live · rendered by the registry
Rendered by tetra-ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://tetra-ui.com/r/textarea-input.jsonSource
1import { cn } from "../lib/utils";2import {3 Input,4 InputPressable,5 type InputProps,6 useInputFocusState,7} from "./input";89// Types10export type TextareaInputProps = InputProps & {11 onFocus?: () => void;12 onBlur?: () => void;13 disabled?: boolean;14 invalid?: boolean;15};1617// Components18export const TextareaInput = ({19 onFocus,20 onBlur,21 disabled,22 invalid,23 className,24 ...props25}: TextareaInputProps) => {26 const { isFocused, internalRef, handleFocus, handleBlur, handlePress } =27 useInputFocusState({ onBlur, onFocus });2829 return (30 <InputPressable31 disabled={disabled}32 focused={isFocused}33 invalid={invalid}34 onPress={handlePress}35 >36 <Input37 {...props}38 className={cn("min-h-24", className)}39 disabled={disabled}40 multiline41 onBlur={handleBlur}42 onFocus={handleFocus}43 pointerEvents={isFocused || disabled ? undefined : "none"}44 ref={internalRef}45 scrollEnabled={false}46 textAlignVertical="top"47 />48 </InputPressable>49 );50};
Files it writes
More from tetra-ui
All 41 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | tetra-ui | Components | Free | 1 dep | |
| Action Inputaction-input | tetra-ui | Components | Free | no deps | |
| Alertalert | tetra-ui | Components | Free | no deps | |
| Avataravatar | tetra-ui | Components | Free | no deps | |
| Badgebadge | tetra-ui | Components | Free | no deps | |
| Bottom Sheetbottom-sheet | tetra-ui | Components | Free | 4 deps · 7 files | |
| Buttonbutton | tetra-ui | Components | Free | no deps | |
| Cardcard | tetra-ui | Components | Free | no deps |
