Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

368
Views
How to change color of ripple effect in button in material ui

I'm trying to change the ripple color effect of a button in Material UI 5. I have tried a lot of different solutions from the Internet, but none of them seems to be working. This is my component:

import React, { MouseEventHandler } from "react";
import { Button as MaterialButton } from "@mui/material";
import { styled } from "@mui/material/styles";

const StyledButton = styled(MaterialButton)({
  boxShadow: "none",
  backgroundColor: "rgb(74, 144, 223)",
  padding: "10px 20px",
  border: "none",
  outline: "none",
  borderRadius: "5px",
  width: "150px",
  "&:hover": {
    backgroundColor: "rgb(83, 162, 255)",
  },
  "&:disabled": {
    backgroundColor: "rgba(74, 144, 226, 0.5)",
    color: "white",
  },
});

type ButtonProps = {
  text: string;
  onClick: MouseEventHandler<HTMLButtonElement>;
  disabled: boolean;
};

export const Button = (props: ButtonProps) => {
  const { text, onClick, disabled } = props;

  return (
    <StyledButton disabled={disabled} variant="contained" onClick={onClick}>
      {text}
    </StyledButton>
  );
};

Button.defaultProps = {
  disabled: false,
};

Any idea how to change it? Right now the ripple effect is computed based on the color property, so if I change it to red both the ripple effect and the font will be shown with a red color. The problem is that I want to change the ripple effect color without modifying the color of the font.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!