Solyza
Solyza

Reputation: 85

How can I change the label elevation of a material ui TextField?

I want to elevate the label of a textfield but I cant, this is my code.

  textStyle: {
    backgroundColor: '#1c1a1a',
    border: 0,
    borderRadius: 0,
    width: 400,
    height: 66,
    display: 'flex',
    justifyContent: 'center',
    alignItems: 'center',
    marginBottom: 10,
    padding: '0 10px',
    '& .MuiFormLabel-root': {
      color: 'grey',
      padding: '1px',
      height:'10px',
    },
  },

height does nothing, how can I elevate the label?

Upvotes: 0

Views: 256

Answers (1)

Parth Shah
Parth Shah

Reputation: 1475

Add this field to your textStyle:

marginTop: -10

Upvotes: 1

Related Questions