#Radio-Button Clickable Arena
17 messages · Page 1 of 1 (latest)
usually the whole internal div is clickable, including related label, if any.
Provide a minimal reproduction of your issue.
So the normal radio button has a circle and the text beside it,the text and the circle is clickable but i added border around it so if i try to click for example at the end if the border it doesnt work
That's not how you usually use material components.
But how did you add that border?
By giving it a class and adding css
please can you provide minimal html and css?
Angular Material components are not designed to be altered like this. They are designed to look like Material Design and nothing else. If you have other design requirements, Angular Material is not the library to use, it will only cause you even more pain in the future.
Ye so what do i do in this position?
- Make your app look like Material design and keep using Angular Material.
- Use a different UI framework.
If you don't show what you're trying to achieve is impossible to give to you any further suggestion.
i added the border but the only clickable thing is the circle and the text not the whole border
As already explained, there are not radios styled following Material guidelines.
You could play around altering their appearance goin gtotally out-of-spec to get what you want, but I highly discourage that.
So what can i do
Abandon this design or Angular Material
but i need to use the formcontrolname for example
formControlName is a directive from Angular's Reactive Forms. It is unrelated to Angular Material and can be used with plain normal radio buttons.