For a theme, how can I found out the style names ? or is there a sample page for that style

Hi ,

I am just new to this framework , and found it wonderful. just wondering if anyone can tell me if there’s a place to find out how to use a theme ,
and you know when I put a control on the page , how to give the control a style name. ??

thanks
Xavier

Hi Xavier,

By default, out-of-the-box CUBA applications use the Halo theme. The theme name is set in the web-app.properties file or via CUBA Studio (Project Properties -> Theme).

Within this theme, you can use the set of predefined styles for the components. These styles you can find in the documentation on a component. For example, here are the standard styles for the Button component:
https://doc.cuba-platform.com/manual-6.4/gui_Button.html#gui_Button_stylenames

To explore the predefined styles in action, welcome to our Sampler: https://demo.cuba-platform.com/sampler/open?screen=styles-label

If the standard theme is not sufficient for your project, you can customise the styles separately. To do so, create a theme extension (Project Properties -> Create theme extension), then you will be able to create new styles and set them for your controls, e.g. nameField.setStyleName(“name-field-style”). This process is also described in the documentation: https://doc.cuba-platform.com/manual-6.4/web_theme_extension.html

thanks man , I see.

And more over, I checked not only the controls, but also the containers, this also can be applied for a style name. thanks for the flexibility .