Customize the entire comment:
NutrientViewer.load({
// ... Your configuration.
ui: {
commentThread: {
comment: () => {
return {
render: () => {
const div = document.createElement("div");
div.style.backgroundColor = "hotpink";
div.style.padding = "5px";
div.innerText = "This is a custom comment.";
return div;
},
};
},
},
},
});
Customize the header slot within a comment:
NutrientViewer.load({
// ... Your configuration.
ui: {
commentThread: {
comment: {
header: () => {
return {
render: () => {
const div = document.createElement("div");
div.style.backgroundColor = "hotpink";
div.style.padding = "5px";
div.innerText = "This is a custom header for a comment.";
return div;
},
};
},
},
},
},
});
Use this to customize comment or its slots.