// Accessing the theme in a component import { useTheme } from '@mui/material/styles'; function DeepChild() { const theme = useTheme(); return <span>{`spacing ${theme.spacing}`}</span>; }