Files

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
823 B
JavaScript
Raw Permalink Normal View History

2025-12-12 14:26:25 +09:00
import * as React from 'react';
import Box from '@mui/material/Box';
import Input from '@mui/material/Input';
function Inputs() {
const inputRef = React.useRef();
React.useEffect(() => {
inputRef.current.focus();
}, []);
return (
<div>
<Box sx={{ display: 'flex', flexDirection: 'column', width: 200 }}>
<Input value="Hello world" sx={{ m: '10px' }} />
<Input placeholder="Placeholder" sx={{ m: '10px' }} />
<Input value="Disabled" sx={{ m: '10px' }} disabled />
<Input error value="Error" sx={{ m: '10px' }} />
<Input value="Focused" inputRef={inputRef} sx={{ m: '10px' }} />
<Input type="search" defaultValue="Hello world" />
</Box>
<Input value="Large input" sx={{ m: '10px', width: 300 }} />
</div>
);
}
export default Inputs;