Text
Text manifests define text values that can be used directly or as children of layouts and cards.
They can optionally bind to one or more datasets and support font-size scaling to fit the available space.
Spec overview
Section titled “Spec overview”apiVersion: bino.bi/v1alpha1
kind: Text
metadata:
name: reportSubtitle
spec:
value: "Quarterly performance overview"
dataset: kpi_summary # string or array
scale: auto # optional scaling modeFields:
spec.value– required string. Supports Markdown syntax (see below) and template expressions (see below).spec.dataset– optional dataset reference; either a single string or an array of strings.spec.scale– optional scaling mode (see Scaling).
Markdown support
Section titled “Markdown support”The value field accepts Markdown. The Markdown is converted to HTML at build time
and the resulting HTML is placed in the bn-text element’s value attribute.
Plain strings still work — they are wrapped in a <p> tag automatically.
Examples
Section titled “Examples”Bold and italic text:
spec:
value: "**Revenue** grew by *12%* this quarter"Links:
spec:
value: "Source: [World Bank](https://data.worldbank.org)"Lists:
spec:
value: |
Key findings:
- Revenue up 12%
- Costs down 3%
- Net margin improvedAsset images:
You can embed images from Asset manifests using the asset: URL scheme:
spec:
value: ""The asset: prefix is resolved at build time to the actual URL. See the Asset reference for details.
Mixed formatting:
spec:
value: |
### Regional Summary
| Region | Growth |
|--------|--------|
| EMEA | +8% |
| APAC | +15% |
> Data as of Q4 2025
Template expressions
Section titled “Template expressions”The value field supports JavaScript template literal syntax for dynamic content.
Expressions are evaluated at runtime in the browser with access to bound datasets and translations.
Available variables inside ${...}:
data.<datasetName>– the bound dataset rows (array of objects).t('<key>')– returns a translated string from the active Internationalization manifest.
spec:
dataset: kpi_summary
value: "Revenue: ${data.kpi_summary[0].ac1}"spec:
value: "${t('report.title')}"Security
Section titled “Security”Template evaluation is sandboxed — only data and t are accessible.
Global objects (window, document, fetch, etc.) are blocked.
The HTML output is sanitized against XSS: only safe tags
(br, b, i, strong, em, span, p, div, table, a, etc.) and
attributes (class, style, href, title, colspan, rowspan) are kept.
Event handlers (onclick, onerror, …) and javascript: URIs are stripped.
Scaling
Section titled “Scaling”The scale field controls how the text component scales its font size
to fit within the available parent space. Scaling considers both width and height —
the tighter constraint wins.
scale value | Behavior |
|---|---|
| (not set) | Auto-scale to fit; emits an AUTO_scale warning with the applied factor |
"none" | No scaling; emits WARN_overflow warning if content overflows |
"auto" | Auto-scale to fit, silently (no warning) |
"0.5", "0.8", "1.2", … | Apply baseFontSize × factor; emits WARN_overflow if content still overflows |
Invalid values (negative, non-numeric, unrecognized keywords) fall back to the
default behaviour and emit an ERR_scale warning.
spec:
value: "This text will shrink to fit its container"
scale: autospec:
value: "Fixed 80% size"
scale: "0.8"Standalone text manifest
Section titled “Standalone text manifest”---
apiVersion: bino.bi/v1alpha1
kind: Text
metadata:
name: mainTitle
spec:
value: "Sales Overview Report"Text as a layout child
Section titled “Text as a layout child”---
apiVersion: bino.bi/v1alpha1
kind: LayoutPage
metadata:
name: sales_layout
spec:
pageLayout: full
children:
- kind: Text
spec:
value: "Sales Overview Report"
scale: autoAttribute Reference
Section titled “Attribute Reference”Common Metadata
Section titled “Common Metadata”| Attribute | Type | Required | Default | Description |
|---|---|---|---|---|
apiVersion | string | yes | — | Must be bino.bi/v1alpha1. |
kind | string | yes | — | Must be Text. |
metadata.name | string | yes | — | Unique identifier. |
metadata.labels | object | no | — | Key-value pairs for categorization and constraint matching. |
metadata.annotations | object | no | — | Arbitrary key-value metadata, not used by the system. |
metadata.description | string | no | — | Free-form description. |
metadata.constraints | array | no | — | Conditional inclusion rules. See Constraints. |
Spec Attributes
Section titled “Spec Attributes”| Attribute | Type | Required | Default | Description | Sample |
|---|---|---|---|---|---|
spec.value | string | yes | — | Text content. Supports Markdown syntax and template expressions ${data.<dataset>[0].field} and ${t('key')}. | value: "**Revenue** grew by *12%*" |
spec.dataset | string or array | no | — | Dataset reference for template interpolation. Single name or array of names. Provided by the withDataset mixin. | dataset: kpi_summary |
spec.scale | string or number | no | auto-scale with warning | Font-size scaling mode. "none": no scaling. "auto": auto-scale silently. Positive number: explicit factor. When omitted, auto-scales and emits a warning. | scale: auto |