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

162
Views
How to give a custom Value for MUI Switch when it is false

I'm using MUI Switch for an On-Off Button. I manually gave the value as "on" and it is working well when switch is true("Im getting output value as "on", but there is no option for changing the default value "false" when the switch is in false state. Is there any way to do that? Code:-

<FormControl>
 <FormControlLabel
  value="on"
  control={<Switch name="status" color="primary"/>}
  {...register("status")}
  label={watch('status') ? "On" : "Off"}
 />
</FormControl> 
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!