For the complete documentation index, see llms.txt. This page is also available as Markdown.

Styling with CSS

Use CSS stylesheets to customize your App's identity even further.

Overview

Ubidots now supports Custom CSS Stylesheets, allowing you to directly access and modify the CSS of your application and its login page. This feature provides greater flexibility to adapt the visual appearance of your solutions beyond the default configuration options.

By applying your own CSS rules, you can:

  • Customize styles such as fonts, colors, and visualization details to better suit your design requirements.

  • Reinforce brand identity by aligning the Application and login page with your organization’s branding guidelines.

  • Enhance user experience by tailoring the interface to your users’ needs.

This feature is intended for users who need more control over the presentation of their Applications, ensuring both the dashboards and the login page deliver a consistent, branded experience.

Styling with CSS can take your application from this:

Login page

Application

To this:

Login page

Application

BEM notation

BEM (Block Element Modifier) is a CSS naming methodology for classes that helps create reusable and maintainable stylesheets. Our design system, VulcanUI, implements a strict BEM convention with the ds- prefix for all component classes.

BEM structure

Ubidots' BEM naming convention follows this pattern:

Where:

  • ds- Required prefix for all VulcanUI design system classes.

  • block - The component name (e.g., Sidebar, Table, NavBar or Accordeon).

  • __element - Optional component part (e.g., __container, __wrapper, __cell).

  • --modifier - Optional state or variant (e.g., --primary, --disabled, --active).

Key rules

Ubidots' BEM notation uses these rules:

  1. Maximum 2-level nesting: Uses block__element, never block__element__subelement

  2. Semantic hierarchy: Elements must be logically positioned under their parent.

  3. Lowercase only: All class names must be lowercase with hyphens.

  4. Consistent separators: Always uses __ for elements and -- for modifiers.

Class examples

Below are a few examples of classes from BEM-supported components in the application. You can find the full list in the respective component sections.

Classes

The following classes target specific HTML <div> tags within the Table component.

  1. ds-table__viewport

  2. ds-table__toolbar

  3. ds-table__wrapper

  4. ds-table__controls

Classes

The following classes target specific HTML <div> tags within the accordion component.

  1. ds-accordion

  2. ds-accordion__toggle

  3. ds-accordion__content

  4. ds-accordion__header

Core/Entity vs. Design System classes

Ubidots implements two distinct CSS class systems that serve different purposes within the platform. Understanding the difference between these systems is crucial for proper styling and customization.

Design System Classes

Design system classes are component-level styles that follow strict BEM notation and are prefixed with ds-. These classes are managed by the VulcanUI design system and provide consistent styling for reusable UI components.

Characteristics:

  • Prefix: Always start with ds-.

  • Scope: Individual UI components (buttons, tables, inputs, etc.).

  • Naming: Follow BEM convention (ds-block__element--modifier).

  • Purpose: Ensure visual consistency across components.

Examples here.

Core/Entity Classes

Core and entity classes are application-level containers that provide structure for entire views and sections within the Ubidots platform. These classes enable entity-specific customization while maintaining global consistency.

Characteristics:

  • Prefix: Entity name or core-.

  • Scope: Page layouts and view containers.

  • Naming: <entity>-view__container pattern, or the core-view__container class

  • Purpose: Enable view-level customization and theming.

  • Structure: Hierarchical container system

Every view in the Ubidots application includes the global core class:

Each entity has its own container class following the pattern <Entity>-view__container:

Common entity examples:

  • devices-view__container

  • dashboards-view__container

  • reports-view__container

  • events-view__container

For a complete list of Core/Entity classes, see here.

Implementation Structure

The final HTML structure within an application combines both class systems:

When to Use Each System

Use Design System Classes (ds-) for:

  • Styling individual UI components

  • Ensuring visual consistency

  • Component-specific states and variants

  • Reusable interface elements

Use Core/Entity Classes for:

  • Page-level layout customization

  • Entity-specific theming

  • View container styling

  • Application-wide structural changes

  • Custom CSS overrides for specific sections

Customization Guidelines

For Design System Components:

For Application Views:

This dual-class system ensures both component consistency through the design system and application flexibility through core/entity classes.

Branding colors

You can access the app's color palette from the CSS stylesheets of both the application and the login page. This is useful if you want to define reusable CSS variables that inherit from those colors.

To do so, use the {{colors.<colorKey>}} bookmark syntax within the CSS stylesheet.

Color keys

Some keys are self-explanatory because they match the color name shown in the App's branding section. Others use descriptive names to help you identify them.

  • iconColor - Icons

  • navbarColor - Primary Navigation

  • variablesIcon

  • loginFormColor - Login Background

  • subHeaderColor - Secondary Navigation

  • widgetBackground

  • widgetTitleColor

  • dangerButtonColor

  • defaultButtonColor - Primary button

  • mainTableItemColor

  • subHeaderTextColor – Navigation text

  • dashboardBackground

  • loginButtonFormColor

  • warningModalCoverColor - Warning

  • variableInfoboxCoverColor

  • informationModalCoverColor

  • loginFooterForegroundColor

  • dataSourceInfoboxCoverColor

  • variableInfoboxDerivedColor

Example

This is an example of using the branding color palette as reusable CSS variables within the stylesheet.

Custom fonts

You can change the font of the entire application and login page with the Custom Font option in the Branding section:

When you click it, a modal opens where you can enter your font URL, usually from Google Fonts or another provider:

Once you import the font, you can use it in your application and login page CSS as follows:

The result is:

Last updated

Was this helpful?