material ui shrink code example

Example 1: material ui textfield with icon button

// imports
import IconButton from "@material-ui/core/IconButton";
import InputAdornment from "@material-ui/core/InputAdornment";
import SearchIcon from "@material-ui/icons/Search";

// render

<TextField
  label="With normal TextField"
  InputProps={{
    endAdornment: (
      <InputAdornment>
        <IconButton>
          <SearchIcon />
        </IconButton>
      </InputAdornment>
    )
  }}
/>

Example 2: MuiInputLabel-shrink change styles

MuiInputLabel: {
      outlined: {
        '&$shrink': {
           transform: 'translate(0px, 0px) scale(0.75)',
          },
      },
    },

Tags:

Misc Example