1

We are trying to use Angular Material Checkbox in a custom visualization. But we do not want the tick mark to appear, i.e. we want an element with color filled but no tick mark. How do we do that? We looked through the css styling part of the documentation but didn't find anything relevant.

2 Answers 2

3

The tickmark is not an icon. It's actually built from a simple rectangle tilted 45deg. All you need is:

md-checkbox.md-checked .md-icon:after {
    border-width: 0;
}

Alternatively, you may use

md-checkbox.md-checked .md-icon:after {
    display: none;
}
Sign up to request clarification or add additional context in comments.

Comments

1

In the latest versions, the tick mark is a SVG. You can simply use :

::ng-deep .mat-checkbox-checkmark {
  display: none;
}

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.