Which import syntax for React allows for tree shaking?

In your case either 1 or 2, both are fine. These will import only Button,TextField from material.

1.

import Button from '@mui/material/Button'
import TextField from '@mui/material/TextField'
import {Button, TextField} from '@mui/material/'

For third one, I assume you meant

import * as MuiMaterial from '@mui/material/'

This will import everything from material