npm install react-ascii-ui
import { AsciiInput } from 'react-ascii-ui';
export default function Example() {
const [value, setValue] = useState('');
return (
<AsciiInput
placeholder="Enter text..."
value={value}
onChange={(e) => setValue(e.target.value)}
/>
);
}<AsciiInput placeholder="Enter text..." />
<AsciiInput type="password" placeholder="Enter password..." />
const [value, setValue] = useState('');
<AsciiInput
value={value}
onChange={(e) => setValue(e.target.value)}
/>| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | - | The controlled value of the input |
| defaultValue | string | - | The default value for uncontrolled usage |
| placeholder | string | - | Placeholder text when input is empty |
| type | string | text | HTML input type (text, password, email, etc.) |
| disabled | boolean | false | Whether the input is disabled |
| onChange | function | - | Function called when input value changes |
| className | string | - | Additional CSS classes |
AsciiInput extends all HTML input attributes and React.InputHTMLAttributes.