ComboBox<Object> comboBox = new ComboBox<>();
comboBox.addClassName("red-combo-box");
<dom-module id="custom-combo-box-styles" theme-for="vaadin-combo-box">
<template>
<style>
:host(.red-combo-box) [part="text-field"] {
--custom-text-field-background-color: red;
}
</style>
</template>
</dom-module>
<dom-module id="custom-text-field-styles" theme-for="vaadin-text-field">
<template>
<style>
[part="input-field"] {
background-color: var(--custom-text-field-background-color, var(--lumo-contrast-10pct));
}
</style>
</template>
</dom-module>