@material-ui/core APIs
- Button
- Typography
- IconButton
- Grid
- TextField
- makeStyles
- Box
- List
- ListItem
- CircularProgress
- ListItemText
- Paper
- Divider
- Tooltip
- DialogContent
- Toolbar
- AppBar
- Card
- Dialog
- Container
- DialogTitle
- FormControl
- MenuItem
- Theme
- FormControlLabel
- CardContent
- CssBaseline
- DialogActions
- createStyles
- Select
- Link
- Checkbox
- DialogContentText
- Snackbar
- TableCell
- TableRow
- Table
- TableBody
- useMediaQuery
- InputAdornment
- ListItemIcon
- Switch
- Chip
- TableHead
- InputLabel
- withStyles
- Avatar
- ThemeProvider
- Drawer
- LinearProgress
- Menu
- CardActions
- createMuiTheme
- TableContainer
- Tab
- Tabs
- Slider
- ListItemSecondaryAction
- useTheme
- CardHeader
- Collapse
- Popover
- Radio
- Hidden
- FormGroup
- Fade
- InputBase
- FormHelperText
- ListSubheader
- Fab
- Input
- Badge
- Step
- AccordionDetails
- AccordionSummary
- RadioGroup
- ButtonGroup
- Slide
- ListItemAvatar
- Stepper
- SvgIcon
- Accordion
- StepLabel
- Modal
- FormLabel
- ClickAwayListener
- ButtonProps
- WithStyles
- Backdrop
- Popper
- createTheme
- ButtonBase
- CardMedia
- MuiThemeProvider
- OutlinedInput
- TextFieldProps
- Grow
- TablePagination
- TextareaAutosize
- darken
- CardActionArea
- TypographyProps
- StepButton
- SelectProps
- Zoom
- TableSortLabel
- styled
- lighten
- InputProps
- GridProps
- fade
- ThemeOptions
- BoxProps
- ExpansionPanel
- ExpansionPanelSummary
- ExpansionPanelDetails
- useScrollTrigger
- TooltipProps
- PopoverProps
- MobileStepper
- TableFooter
- Icon
- debounce
- Breadcrumbs
- BottomNavigation
- StepConnector
- SwipeableDrawer
- ButtonBaseProps
- MenuList
- DialogProps
- Portal
- SvgIconTypeMap
- capitalize
- alpha
- colors
- InputBaseProps
- NativeSelect
- ChipProps
- IconButtonProps
- emphasize
- SnackbarContent
- PaletteType
- CheckboxProps
- GridSize
- GridItemsAlignment
- SvgIconProps
- SnackbarOrigin
- NoSsr
- withTheme
- WithTheme
- TextareaAutosizeProps
- ExpansionPanelActions
- createSvgIcon
- SnackbarContentProps
- BreadcrumbsProps
- LinearProgressProps
- responsiveFontSizes
- ThemeProviderProps
- GridSpacing
- SliderTypeMap
- TabsActions
- PaperProps
- SnackbarCloseReason
- Alert
- Stack
- Skeleton
- ExtendButton
- ExtendButtonBase
- AlertProps
- ImageList
- ImageListItem
- StepContent
- getLuminance
- LinkProps
- StepIconProps
- ToolbarProps
- isWidthUp
- WithWidthProps
- isWidthDown
- PopperProps
- Options
- ServerStyleSheets
- WithWidth
- BottomNavigationAction
- InputAdornmentProps
- FormControlProps
- hexToRgb
- ListItemProps
- AppBarProps
- TypographyClassKey
- Autocomplete
- StylesProvider
Other Related APIs
@material-ui/core#Skeleton TypeScript Examples
The following examples show how to use
@material-ui/core#Skeleton.
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: ProductGrid.tsx From storefront with MIT License | 5 votes |
ProductGrid: React.VFC<Props> = ({ loading, products }) => {
if (!loading && products.length === 0) {
return <Typography>No products found.</Typography>;
}
return (
<Grid container spacing={4}>
{loading
? rangeMap(12, (i) => (
<Grid key={i} item xs={6} md={3}>
<Skeleton variant="rectangular" height={375} />
</Grid>
))
: products.map(
(product) =>
product != null && (
<Grid key={product.id} item xs={6} md={3}>
<Paper sx={{ height: '100%', textAlign: 'center' }}>
<Link
href={`/product/${product.slug}`}
underline="none"
sx={{ display: 'flex', flexDirection: 'column', height: '100%' }}
>
<Image height={673} loading="lazy" mediaItem={product.image} width={538} />
<Box sx={{ p: 2 }}>
{product.__typename === 'VariableProduct' && (
<Stack
direction="row"
spacing={1}
sx={{ justifyContent: 'center', mb: 2 }}
>
{product.paColors?.nodes?.map(
(color) =>
color?.name != null && (
<ColorSwatch key={color.id} color={color.name} size="small" />
),
)}
</Stack>
)}
<Typography gutterBottom variant="h4">
{product.name}
</Typography>
{(product.__typename === 'SimpleProduct' ||
product.__typename === 'VariableProduct') &&
(product.stockStatus === StockStatusEnum.OUT_OF_STOCK ? (
<Typography color="error" variant="h5">
Out of stock
</Typography>
) : (
<Price color="primary" variant="h5">
{product.price}
</Price>
))}
{product.__typename === 'ExternalProduct' && (
<Price color="primary" variant="h5">
{product.price}
</Price>
)}
</Box>
</Link>
</Paper>
</Grid>
),
)}
</Grid>
);
}