How to align a component to the right with MUI React?

To align a component to the right with MUI React, we set the Grid component’s justifyContent prop to flex-end.

For instance, we write

<Grid container justifyContent="flex-end">
  <Button>Example</Button>
</Grid>

to set the Grid component’s justifyContent prop to flex-end to align the Button inside to the right.