Skip to main content

css

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

css?: string;

Example

<style>
.custom {
--dhx-color-primary: #118d8d;
--dhx-background-primary: rgba(209, 250, 250, 0.3);
--dhx-background-secondary: rgba(17, 141, 141, 0.1);
--dhx-background-additional: rgba(17, 141, 141, 0.3);
}
</style>

<script>
const list = new dhx.List("list_container", {
css: "custom dhx_widget--bordered", //the names of the CSS classes separated by space
template,
data,
});
</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 List:

const list = new dhx.List("list_container", {
css: "dhx_widget--bg_white"
});

Related articles: