Skip to content
GitHub

Styling and internationalization

This guide shows how to combine ComponentStyle and Internationalization manifests. You will define a style, a translation block, and reference them from layouts conceptually.

---
apiVersion: bino.bi/v1alpha1
kind: ComponentStyle
metadata:
  name: corporateTheme
spec:
  content:
    global:
      fontFamily: "Inter, system-ui, sans-serif"
      fontSizePx: 12
      fontColor: "#374151"

The code must exactly equal the artefact's spec.language (de or en — never a regional tag like en-US), and with no namespace the content merges into the _system bundle every component reads, overriding only the keys you set:

---
apiVersion: bino.bi/v1alpha1
kind: Internationalization
metadata:
  name: labels_en
spec:
  code: en
  content:
    global.ac1: "Actual"
    global.pl1: "Budget"
    bn-table.there_of: "of which"

Styles named _default apply to all components automatically. A named style like corporateTheme is opted into per component via spec.selectedStyle:

---
apiVersion: bino.bi/v1alpha1
kind: ChartStructure
metadata:
  name: revenue_chart
spec:
  dataset: revenue_by_region
  chartTitle: "Revenue by Region"
  selectedStyle: corporateTheme

The effective style merges the built-in _system defaults, then _default, then the selected named style. See the ComponentStyle reference for the full style structure and the list of supporting kinds; the sales-dashboard sample wires a named style the same way.

To theme a whole report at once, set selectedStyle on the ReportArtefact instead of per component — pages and components inherit it as their default, and any element can still select its own style (nearest ancestor wins). See Style inheritance.

Translations apply globally by default. To scope a translation set to part of a report, store it under a named spec.namespace and point pages or components at it with i18nNamespace (inheritable, nearest ancestor wins). Text components can also reference free-form keys with ${t('my.key')} in their value template. The full token vocabulary and the bino add i18n --defaults scaffold are in the Internationalization reference.

A styled report dashboard with corporate theme applied