I tried to use the out-of-box SharePoint "checkbox" field in a SharePoint list, however, it does not visually display as a checkbox either in classic or modern view. It was also cumbersome for users to edit. So, I chose the "choice" field instead.
Is there JSON you can share that would display the choice as a visual checkbox, that is also centered in the column?
I've used the JSON below to get the checkbox, but it is not centered.
{
"$schema": "https://developer.microsoft.com/json-schemas/sp/column-formatting.schema.json",
"elmType": "div",
"attributes": {
"iconName": "=if(@currentField,'CheckboxComposite','Checkbox')",
"class": "=if(@currentField,'ms-fontColor-neutralPrimary','ms-fontColor-neutralTertiary')+' ms-font-l'"
}
}
