How to align a component to the center/right with Material UI?

BEFORE Material UI 5:

Try this

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

UPDATE Material UI 5: (Thanks to Dipak)

The prop justify of ForwardRef(Grid) is deprecated. Use justifyContent instead, the prop was renamed.

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

Update: The best solutions are the answers of NearHuscarl or Eduardo Oviedo Blanco, you’d rather use Stack or Box than Grid.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)