Set textAlign: "left" | "center" | "right" and textVerticalAlign: "top" | "center" | "bottom" on text primitives or caption-bearing widgets. Explicit fields require firmware advertising text.align.v1; update the Dock and Native Simulator before testing. No permission or JavaScript runtime is added. Existing packages retain their defaults and firmware requirements.
textAlign: "left" | "center" | "right"
textVerticalAlign: "top" | "center" | "bottom"
text.align.v1
{ "id": "reading", "type": "text", "x": 24, "y": 96, "w": 360, "h": 120, "bind": "reading", "textAlign": "right", "textVerticalAlign": "center" }
widget.style overrides matching top-level fields, as it does for font and color. Styles are local; a parent does not change its children. Containers and collections have no implicit visible caption: align their child text widgets. Slider, progress, arc, rect, image and icon reject text-alignment fields. Their accessibility labels do not become visible captions.
widget.style
font
color
Use optionTextStyle to align the popup independently. It accepts only the two alignment fields; omitted fields inherit the resolved selected-caption alignment. Options remain business data (label, value, optional disabled).
optionTextStyle
label
value
disabled
{ "id": "destination", "type": "select", "x": 24, "y": 240, "w": 360, "h": 64, "emit": "destination", "textAlign": "right", "textVerticalAlign": "center", "optionTextStyle": { "textAlign": "left", "textVerticalAlign": "bottom" }, "options": [{ "label": "Local archive", "value": "local" }] }
Alignment moves the measured text block inside the existing caption rectangle. Wrapping and font line metrics determine its height; changing bound text or options remeasures it. Text widgets and control captions wrap. Text primitives wrap only with wrap: true; their existing align alias remains supported, with textAlign taking precedence. New explicit alignment clips to the authored rectangle. A block taller than that rectangle starts at the top, preserving the beginning of the text. Horizontal alignment still applies.
wrap: true
align
textAlign
Buttons move their icon and caption as one group; icon-only buttons keep their existing centered icon. Arrows, toggles, radio indicators, value-adjustment buttons, tabs and hit bounds stay fixed. Do not insert spaces, empty lines, inflated line heights or text bitmaps to create alignment. Container child layout and mixed-font baseline alignment are separate concerns.
The SDK exports TextAlignment, TEXT_ALIGNMENT_CAPABILITY, TEXT_ALIGNMENT_GUIDANCE and widgetTextAlignment. CLI, standalone MCP, Desktop MCP and Vibe expose the same contract through controlStyle.textAlignment, SDK context and native-control guidance. Package checks reject invalid values and unsupported controls. Capability negotiation prevents sending new alignment to older firmware.
TextAlignment
TEXT_ALIGNMENT_CAPABILITY
TEXT_ALIGNMENT_GUIDANCE
widgetTextAlignment
controlStyle.textAlignment
Run the standalone tools against the editable plugin directory:
bolt-plugin check ./my-plugin bolt-plugin screenshot ./my-plugin ./alignment.png
CLI --help includes the alignment guidance. Standalone MCP exposes the capability through plugin_read.context.controlStyle.textAlignment; use plugin_check and plugin_screenshot to check the package and inspect fixture rendering. Desktop MCP exposes the same contract through plugin_context with overview, sdk or all, and reports device compatibility through plugin_list and plugin_runtime status.
--help
plugin_read.context.controlStyle.textAlignment
plugin_check
plugin_screenshot
plugin_context
overview
sdk
all
plugin_list
plugin_runtime status
A passing package or fixture check does not establish Dock compatibility. If Studio reports missing text.align.v1, update Dock firmware, reconnect, and retry. Read the plugin's deviceIssue.message and deviceIssue.details.missingFeatures before changing source or permissions. Installation and open acknowledgements do not prove that activation succeeded. See Dock compatibility diagnostics.
deviceIssue.message
deviceIssue.details.missingFeatures
Verify all nine combinations in browser preview and the updated Native Simulator. Check multiline/CJK text, long values, disabled/selected states, popup choices, dynamic bindings, clipping and page revisit. The maintainer fixture is apps/desktop/scripts/fixtures/text-alignment.json; it is also exercised by the native capture suite. A Simulator check does not certify a physical Dock.
apps/desktop/scripts/fixtures/text-alignment.json