Skip to main content

css

Optional. Adds a CSS class(es) to the component

css?: string;

Example‚Äč

<style>
.custom {
--dhx-font-weight-regular: 500;
--dhx-font-color-primary: #0ab169;
}
.custom .dhx_tree-folder {
--dhx-font-color-primary: #0288d1;
}
</style>

<script>
const tree = new dhx.Tree("tree_container", {
css: "custom"
});
</script>

Related samples:

Note, that the DHTMLX library provides a set of own CSS classes that you can also apply to change the appearance of Tree:

const tree = new dhx.Tree("tree_container", {
css: "dhx_widget--bg-gray"
});

Related articles: