really simple and quick question
Unanswered
Southern rough shrimp posted this in #help-forum
Southern rough shrimpOP
Hey, can anyone please tell me how to change color of checkbox when it is checked, <input type="checkbox" className={styles.checkbox}></input> this is my jsx code, I've tried like 10 google results nothing works ........
16 Replies
Sun bear
As I stated already in #discussions Chat:
Uhh, what do you mean? You can simply do it with CSS e.g.:
// styles.module.css
.checkbox {
/* Style for unchecked Checkbox /
}
.checkbox:checked {
/ Style for checked Checkbox */
background-color: green;
}
Uhh, what do you mean? You can simply do it with CSS e.g.:
// styles.module.css
.checkbox {
/* Style for unchecked Checkbox /
}
.checkbox:checked {
/ Style for checked Checkbox */
background-color: green;
}
@Sun bear As I stated already in <#752647196419031042> Chat:
Uhh, what do you mean? You can simply do it with CSS e.g.:
// styles.module.css
.checkbox {
/* Style for unchecked Checkbox /
}
.checkbox:checked {
/ Style for checked Checkbox */
background-color: green;
}
Southern rough shrimpOP
Not working
Sun bear
Send your code pls
Southern rough shrimpOP
I have no other css that impacts it
Check this out maybe
Sun bear
You need to give some addition information. Do you use TailwindCSS ? Vanilla CSS? How did you import your CSS?
Southern rough shrimpOP
Just vanilla css
basic styles config
I mean I use scss but its the same
Sun bear
Where in your NextApp have you imported your styles? Have you checked if they're working properly?
Southern rough shrimpOP
they are
"You can't simply re-style checkboxes because of their native appearance settings. There's workarounds like this one"
Sun bear
Oh
Send me CSS for your checkbox