TextInput
TextInputコンポーネントは、テキスト入力フィールドを作成するためのコンポーネントです。
基本的な使い方
import { Card, Form, Flexbox, TextInput, Button } from "@basemachina/view";
const App = () => {
return (
<Card>
<Form onSubmit={() => {}}>
<Flexbox direction="col">
<TextInput name="id" label="ID" />
<Button type="submit" title="送信" color="blue" />
</Flexbox>
</Form>
</Card>
);
};
export default App;

詳細なインターフェース
名前 | 説明 | デフォルト値 |
---|---|---|
name | フィールドの名前を指定します。 | 必須 |
label | ラベルを指定します。 | なし |
placeholder | プレースホルダーを指定します。 | なし |
onChange | 入力内容の変更を検知するイベントハンドラー関数を指定します。引数としてReactイベントオブジェクト (opens in a new tab)が渡されます。 | 任意 |