@mui/material APIs
- Button
- IconButton
- Typography
- MenuItem
- Box
- Tooltip
- TextField
- CircularProgress
- FormControlLabel
- List
- Divider
- ListItem
- ListItemText
- Select
- Grid
- ThemeProvider
- FormControl
- Link
- useTheme
- InputLabel
- Paper
- Dialog
- DialogTitle
- Toolbar
- createTheme
- LinearProgress
- Container
- Checkbox
- ListItemIcon
- DialogContent
- Card
- CssBaseline
- Theme
- useMediaQuery
- Menu
- Alert
- Tab
- DialogActions
- AppBar
- Switch
- Drawer
- Chip
- InputAdornment
- Collapse
- Stack
- CardContent
- DialogContentText
- TableBody
- TableCell
- TableRow
- Skeleton
- Table
- Tabs
- Avatar
- Autocomplete
- FormGroup
- SelectChangeEvent
- Radio
- AlertTitle
- TableHead
- InputBase
- Input
- Snackbar
- TextFieldProps
- styled
- alpha
- TableContainer
- CardActions
- Badge
- CardHeader
- ListItemButton
- CardActionArea
- Modal
- AccordionDetails
- AccordionSummary
- ButtonProps
- StyledEngineProvider
- RadioGroup
- ListItemAvatar
- Fade
- CardMedia
- Accordion
- Slider
- FormLabel
- FormHelperText
- Popover
- Backdrop
- Popper
- ThemeOptions
- Zoom
- ToggleButton
- ToggleButtonGroup
- SxProps
- Fab
- TooltipProps
- IconButtonProps
- CircularProgressProps
- darken
- TextareaAutosize
- OutlinedInput
- Breadcrumbs
- Slide
- SwipeableDrawer
- ClickAwayListener
- SelectProps
- TypographyProps
- ButtonBase
- ListItemSecondaryAction
- SvgIcon
- Pagination
- tooltipClasses
- ButtonGroup
- Hidden
- debounce
- FilledInput
- lighten
- useScrollTrigger
- darkScrollbar
- PaletteMode
- SnackbarCloseReason
- MenuList
- SvgIconProps
- SnackbarProps
- AlertColor
- Icon
- TablePagination
- MenuItemProps
- Stepper
- Step
- StepLabel
- ownerWindow
- useForkRef
- AlertProps
- InputUnstyled
- Rating
- capitalize
- SpeedDial
- SpeedDialAction
- SpeedDialIcon
- BadgeProps
- createSvgIcon
- Grow
- linearProgressClasses
- PaletteColor
- BottomNavigation
- Palette
- responsiveFontSizes
- OutlinedInputProps
- TabProps
- NoSsr
- PaletteOptions
- ListSubheader
- ImageList
- StepConnector
- tableCellClasses
- TableSortLabel
Other Related APIs
@mui/material#InputUnstyled TypeScript Examples
The following examples show how to use
@mui/material#InputUnstyled.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: index.tsx From Cromwell with MIT License | 5 votes |
export default function NewsletterPlugin(): JSX.Element { const [email, setEmail] = useState(''); const [hasSubscribed, setHasSubscribed] = useState(false); const [canValidate, setCanValidate] = useState(false); const classes = useStyles(); const validateEmail = (email) => /\S+@\S+\.\S+/.test(email); const submit = async () => { if (!canValidate) setCanValidate(true); if (!validateEmail(email)) return; const client = getRestApiClient(); try { const response = await client.post('plugin-newsletter/subscribe', { email }); if (response) { setHasSubscribed(true); } } catch (e) { console.error('Newsletter::submit error: ', e) } } return ( <div className={classes.subscribeInputContainer}> {hasSubscribed ? ( <div> <CustomAlert severity="success">Thank you for subscription!</CustomAlert> </div> ) : (<> <Tooltip open={canValidate && !validateEmail(email)} title="Invalid e-mail" arrow> {/* <InputBase className={classes.subscribeInput} value={email} onChange={(e) => setEmail(e.target.value)} inputComponent={(props) => <input {...props} aria-label="Leave e-mail to subscribe for newsletter" />} /> */} <InputUnstyled components={{ Input: StyledInputElement }} className={classes.subscribeInput} value={email} onChange={(e) => setEmail(e.target.value)} /> </Tooltip> <Button onClick={submit} variant="contained" color="primary" className={classes.subscribeBtn}>Subscribe!</Button> </>)} </div > ) }