
텍스트 입력
사용자가 텍스트를 입력하고 편집할 수 있습니다.- Usage
- Props
Copy
Ask AI
import { RecoilRoot } from "recoil";
import { TextInput } from "@/ui/input/components/TextInput";
export const MyComponent = () => {
const handleChange = (text) => {
console.log("Input changed:", text);
};
const handleKeyDown = (event) => {
console.log("Key pressed:", event.key);
};
return (
<RecoilRoot>
<TextInput
className
label="Username"
onChange={handleChange}
fullWidth={false}
disableHotkeys={false}
error="Invalid username"
onKeyDown={handleKeyDown}
RightIcon={null}
/>
</RecoilRoot>
);
};
자동 크기 조정 텍스트 입력
내용에 따라 자동으로 높이가 조정되는 텍스트 입력 컴포넌트.- Usage
- Props
Copy
Ask AI
import { RecoilRoot } from "recoil";
import { AutosizeTextInput } from "@/ui/input/components/AutosizeTextInput";
export const MyComponent = () => {
return (
<RecoilRoot>
<AutosizeTextInput
onValidate={() => console.log("onValidate function fired")}
minRows={1}
placeholder="Write a comment"
onFocus={() => console.log("onFocus function fired")}
variant="icon"
buttonTitle
value="Task: "
/>
</RecoilRoot>
);
};
텍스트 영역
다중 라인 텍스트 입력을 만들 수 있습니다.- Usage
- Props
Copy
Ask AI
import { TextArea } from "@/ui/input/components/TextArea";
export const MyComponent = () => {
return (
<TextArea
disabled={false}
minRows={4}
onChange={()=>console.log('On change function fired')}
placeholder="Enter text here"
value=""
/>
);
};