Files
react-test/docs/data/joy/components/textarea/UnderlineTextarea.tsx
how2ice 005cf56baf
Some checks failed
No response / noResponse (push) Has been cancelled
CI / Continuous releases (push) Has been cancelled
CI / test-dev (macos-latest) (push) Has been cancelled
CI / test-dev (ubuntu-latest) (push) Has been cancelled
CI / test-dev (windows-latest) (push) Has been cancelled
Maintenance / main (push) Has been cancelled
Scorecards supply-chain security / Scorecards analysis (push) Has been cancelled
CodeQL / Analyze (push) Has been cancelled
init project
2025-12-12 14:26:25 +09:00

57 lines
1.5 KiB
TypeScript

import Textarea from '@mui/joy/Textarea';
import Stack from '@mui/joy/Stack';
export default function UnderlineTextarea() {
return (
<Stack spacing={2}>
<Textarea
minRows={2}
placeholder="Type in here…"
sx={{
'&::before': {
border: '1.5px solid var(--Textarea-focusedHighlight)',
transform: 'scaleX(0)',
left: '2.5px',
right: '2.5px',
bottom: 0,
top: 'unset',
transition: 'transform .15s cubic-bezier(0.1,0.9,0.2,1)',
borderRadius: 0,
borderBottomLeftRadius: '64px 20px',
borderBottomRightRadius: '64px 20px',
},
'&:focus-within::before': {
transform: 'scaleX(1)',
},
}}
/>
<Textarea
minRows={2}
placeholder="Type in here…"
variant="soft"
sx={{
borderBottom: '2px solid',
borderColor: 'neutral.outlinedBorder',
borderRadius: 0,
'&:hover': {
borderColor: 'neutral.outlinedHoverBorder',
},
'&::before': {
border: '1px solid var(--Textarea-focusedHighlight)',
transform: 'scaleX(0)',
left: 0,
right: 0,
bottom: '-2px',
top: 'unset',
transition: 'transform .15s cubic-bezier(0.1,0.9,0.2,1)',
borderRadius: 0,
},
'&:focus-within::before': {
transform: 'scaleX(1)',
},
}}
/>
</Stack>
);
}