MUI customize button color?

Nema Ga picture Nema Ga · Sep 29, 2017 · Viewed 108k times · Source

I am struggling to modify button colors in MUI next (v1).

How would I set muitheme to behave similarity to bootstrap, so I could just use "btn-danger" for red, "btn-success" for green... ?

I tried with custom className but it doesn't work properly (hover color does't change) and it seems repetitive. What options do I have?

Answer

Adnan picture Adnan · Jun 26, 2018

You can try this

<Button
    style={{
        borderRadius: 35,
        backgroundColor: "#21b6ae",
        padding: "18px 36px",
        fontSize: "18px"
    }}
    variant="contained"
    >
    Submit
</Button>