The Input
component provides a basic text input field styled according to the application's design system. It is customizable with standard HTML input attributes for seamless integration into forms or other user interfaces.
import React from 'react';
import { Input } from '~/ui/components/Form';
export default function App() {
return (
<div>
<Input
type="text"
placeholder="Enter your name"
name="username"
/>
</div>
);
}
Name | Type | Default | Description |
---|---|---|---|
className | string | undefined | Additional CSS classes to be applied to the input component |
type | string | text | Specifies the type of input (e.g., "text", "password") |
name | string | undefined | Specifies the name of the input field |
placeholder | string | undefined | A hint to the user of what can be entered in the input |
disabled | boolean | false | Indicates whether the input is disabled |
value | string | undefined | Specifies the value of the input field |
onChange | function | undefined | Handler for changes to the input's value |