Home > OS >  Any way to style a MUI Chip with the same length as another one
Any way to style a MUI Chip with the same length as another one

Time:11-16

I want to display some mui chips with different labels and they should be the same length.

e.g. it should look something like this

MUI Chips same length

Thanks in advance!

CodePudding user response:

I just figured out, one way to do so is by simply adding the style tag minWidth to all of them

<Chip
  sx={{ borderRadius: 1 }}
  variant="outlined"
  label={'Pending'}
  style={{
   backgroundColor: '#FEF8E8',
   color: '#FFBD00',
   border: 'none',
   minWidth: '100px'
   }}
/>
  • Related