Beamline

Docs · Updated

Upgrade Beamline

Beamline code and your custom style files stay in your repo; your app has no Beamline runtime dependency. This documentation ships with the complete system (docs/UPGRADE.md in the kit). Use local kit tools or connect an agent to install parts.

Read the release's migration notes before moving to another minor version. The additive-only 0.1.x promise remains: props may be added within 0.1, while the coordinated 0.2 migration can change props, roots/slots, CSS and appearance contracts. Release descriptors identify exact immutable graph, source and package artifacts.

What an upgrade preserves

Use the upgrade path for the installation you chose. Compiled packages replace selected release archives; managed source compares your files with the recorded baseline and the new release, stopping for overlapping edits. Custom styles live outside the managed component tree and stay with your app. A shadcn overwrite is not that managed merge. Keep the app and its recorded Beamline files in version control, read migration notes, and exercise your actual screens after changing a release.

Full-source base upgrades

New source-only installs default to full source (source, or add --full-source). The managed selection includes runtime, foundation, tokens, helper code, selected looks and setup functions, generated stylesheet entries, fonts and licence notices. upgrade --release <target> --install uses the same baseline/local/upstream merge for all of these files as for components. Customer edits in a base file survive non-overlapping upstream changes; overlapping edits stop as a pending proposal for resolve and apply. Changed binary fonts on both sides require an explicit choice. Keep beamline-ui.lock.json and .beamline/ with the source so those baselines remain available.

Existing source locks without selection.base: "source" keep their packaged base and existing imports, including on upgrade. A new default never silently changes an existing app's runtime. To migrate, follow the full-source steps in INSTALL.md; do not mix a local runtime with compiled Beamline components. shadcn installs do not create managed baselines: its overwrite operation remains a replacement, so choose the Beamline CLI from the start when you need managed merges.

Conventional prop names, with compatible aliases

Applies to 0.2.0-rc.34.

Existing calls still work. Deprecated names emit one warning per component/prop after mounting in development; production emits none. For setting props, the new name wins when both names are supplied on an instance. Existing visual defaults and styling are retained.

Scroll sideways to compare columns

Component or partExisting propPreferred prop
BarChart, ConversationBar, MessageContent, TabsList, TabsNavvariantappearance
TableOfContentsvariantappearance
Ratingvariantmode
Creditvariantpresentation
Glowvarianteffect
ImageGenerationvariantreveal
InlineEditvarianttextStyle
LightBand, Waveformvariantshape
Reasoningvariantmode
ThemeSwitchvariantanimation
ColorPalette, PieChart, RadarChart, RadialChartnumeric sizediameter
SheetContentCSS sizewidth
DialogContentwidth-preset sizewidth (same sm/md/lg/xl presets)
WaffleChartnumeric sizewidth
AnnouncementBar, Sidebartoneappearance
AppShellsidebarTonesidebarAppearance
Itemvariant="plain", variant="card"variant="ghost", variant="secondary"
ItemIcona named-colour tonepalette; semantic tones also accept success/warning/danger/info
NotificationItemtone="mention"tone="accent" (keeps the mention icon)
Gaugesize="fill"fill
AvatarGroup, AttachmentGlyphsize="xs"compact
ToggleGroupvariant="default", size="default"variant="ghost", size="md"
PromptBartall, onSendsize="lg", onSubmit
TreeViewexpandedIds, defaultExpandedIds, selectedId, defaultSelectedIdexpanded, defaultExpanded, selected, defaultSelected
Calendar, DatePicker, TimePicker, MentionInput, OtpInputvalue callback onChangeonValueChange

Scoped defaults retain their existing design keys (variant, size, tone, etc.). For example, use defaults={{ "bar-chart": { variant: "grid" } }}; the canonical appearance name is currently an instance prop. An explicit instance prop overrides the scope, including an explicitly supplied legacy prop. There is no requirement to rewrite saved appearance settings.

Positive visibility props take precedence over their negative aliases. Replace hideLabel={condition} with showLabel={!condition}; apply the same inversion to hideTitle → showTitle and hideAudioTags → showAudioTags. Defaults remain unchanged. The following components expose these aliases:

Scroll sideways to compare columns

Preferred propComponents
showLabelChipGroup, ColorPicker, DatePicker, Input, MentionInput, MicSelector, MultiSelect, OtpInput, PasswordField, PhoneInput, RadioCards, RadioGroup, Rating, SegmentedControl, Select, ShortcutRecorder, Slider, SpeechInput, TagInput, TimePicker, VoicePicker
showTitleActivityHeatmap, AreaChart, BarChart, ComposedChart, Gauge, LineChart, PieChart, RadarChart, RadialChart, Ridgeline, SankeyChart, SlopeChart, Streamgraph, Treemap, WaffleChart
showAudioTagsTranscriptViewer

Calendar, DatePicker, TimePicker, MentionInput and OtpInput notify both onChange and onValueChange when both callbacks are supplied; choose one callback name when migrating.

Native Input, PasswordField, Textarea and SearchField keep React's onChange(event) and also call onValueChange(text). Native onChange is not deprecated. SearchField now updates its own value and calls both observers when a native handler is supplied.

Additional controlled/uncontrolled pairs are available for Accordion (open), Calendar (value, view), OtpInput (value), InlineEdit (value), ColorPicker (format), Timeline (expanded), Item (selected) and ThemeSwitch (theme). TreeView's onSelectedChange(id) reports selection; onSelect(node) still reports activation. Explicit null clears supported nullable selections. InlineEdit commits and reports its new value only after onSave succeeds; a rejection keeps the draft and error visible.

Pagination now accepts defaultPage (1 when omitted), OrderBook accepts defaultGrouping (the first grouping or tick), and Watchlist accepts defaultStarred. Omit both starred and defaultStarred to keep stars hidden. Existing controlled callers keep their behavior.

SignaturePad adds value/defaultValue/onValueChange for strokes, color/defaultColor/onColorChange, width/defaultWidth/onWidthChange, and typed/defaultTyped/onTypedChange. Its legacy onChange still observes the initial/current strokes; the new onValueChange fires only for drawing, undo and clear. Migrating that observer requires handling the initial strokes yourself if your application used the initial notification.

Alert adds defaultOpen, onOpenChange and dismissible. Existing onDismiss-only use keeps its event-only behavior; pass dismissible or onOpenChange to opt into local closing. A controlled open remains owned by the caller.

AnalyticsDashboard adds controlled range, segment and sidebar props. ProductAnalytics adds controlled query and sidebar props; CRM, SalesDashboard and StatusDashboard add controlled sidebar props. OrderTicket adds defaultPrice alongside price/onPriceChange. TradingTerminal adds controlled symbol/onSymbolChange. Settings adds draft/onDraftChange over saved values and onPeriodChange after a successful plan change. SignIn adds email/onEmailChange; SignupForm adds values/defaultValues/onValuesChange for name, email and password. Consent and temporary verification codes remain local to their forms.

RadioCards now accepts a ref to its radiogroup while preserving its measurement ref. StepForm gives className precedence over classNames.root. ShortcutRecorder and ShortcutCheatsheet honor platform, which Kbd also accepts. Orb's unused resizeDebounce is deprecated; omit it.

Missing chart values, targets, source chunk counts, holding prices, costs and cash are no longer silently counted as zero in the affected summaries. Partial pie/bar-list data no longer claim whole-total percentages, missing candle volume produces a chart gap, and wholly unmeasured invoice lines and unset allocation changes no longer produce zero subtotals or numeric deltas. These corrected unmeasured states can change displayed totals for incomplete data.

To 0.2.0-rc.34: Portfolio daily P&L uses calendar dates

Portfolio.dailyPnl now takes PnlDay[]: rename day to date and supply a full YYYY-MM-DD date. Display labels such as "Oct 11" must be replaced with the corresponding date from your account history; the component cannot infer their year. Keep pnl: null for an unrecorded result and pnl: 0 for a measured zero.

// before
<Portfolio holdings={holdings} dailyPnl={[{ day: "Oct 11", pnl: 125 }]} />
// after (the account's actual calendar date)
<Portfolio holdings={holdings} dailyPnl={[{ date: "2026-10-11", pnl: 125 }]} />

The existing P&L calendar now provides month navigation, day details, and week and month totals. Optional trades and wins values can accompany each day. The classNames.daily slot remains available.

To 0.2.0-rc.32: BillingToggle is a SegmentedControl option; Advertisement is retired

  • BillingToggle became two option fields of SegmentedControl. Give the option its note (the badge before) and its activeNote (the activeBadge before); the note turns into the saving while that option is chosen, as before.

    The old code below is a historical fragment; BillingToggle is no longer exported.

    <BillingToggle value={period} onValueChange={setPeriod} options={[
      { value: "monthly", label: "Monthly" },
      { value: "yearly", label: "Yearly", badge: "−20%", activeBadge: "Saving 20%" },
    ]} />

    Current replacement:

    import { useState } from "react";
    import { SegmentedControl } from "@beamline/segmented-control";
    
    export function BillingPeriod() {
      const [period, setPeriod] = useState("monthly");
      return (
        <SegmentedControl hideLabel label="Billing period" size="sm" value={period} onValueChange={setPeriod} options={[
          { value: "monthly", label: "Monthly" },
          { value: "yearly", label: "Yearly", note: "−20%", activeNote: "Saving 20%" },
        ]} />
      );
    }

    classNames.badge is classNames.note. The old size="lg" look is SegmentedControl's size="md".

  • Advertisement is no longer part of Beamline. For news inside a product use AnnouncementBar; for a promotion, a Card.

  • A copy you already have keeps working: source copied into your app is yours and still builds, since what it imports (SegmentedControl, TextMorph) stays. The install tool and the MCP no longer offer billing-toggle or advertisement: asking for either answers with what replaced it, and the old library pages lead there.

To 0.2.0-rc.22: settings with navigation none sit in your page

A <Settings navigation="none"> no longer paints its own background or centres its column: it takes your page's background and starts at its left edge, so give its container the padding your other content has. The profile section's help text is neutral now; tests that matched the old sentences need the new ones.

To 0.2.0-rc.21: a data grid fits its rows; required fields name themselves once

  • DataGrid height is now the most the grid grows to: a grid with a few rows is as tall as its rows, so the content under it moves up. To keep a fixed box, give the grid's container that height and pass height="fill".
  • Tests that found a required field by its old name ("Email required") now find it by the label's words ("Email"); the field still reports required. No visual change.

To 0.2.0-rc.20: looks bring their fonts

The next install adds your looks' typefaces as packages (Prism: Geist, Geist Mono, Instrument Serif; the stylesheet imports them), so type that fell back to the system face now shows the look's own. Each face loads only where text uses it. To keep a font out, remove --fonts <id>; Prism's parts also changed their finish (see the changelog), with no prop or layout changes.

To 0.2.0-rc.19: Prism becomes the default look

Your app keeps the look it installed when its root names it: <UIRoot preset={soft}> (or data-look="soft" on a static root) looks exactly as before. Three cases change:

  • A root that names no look. A <UIRoot> without preset, or <html class="pui dark"> without data-look, now means Prism. If the app installed only Soft (the old default), that root is no longer painted: switches, slider tracks and field frames go invisible. Name the look you installed (preset={soft} from @beamline/look-soft, or data-look="soft"), or add Prism with install --preset prism. The audit flags the UIRoot case.
  • Pop without an accent. UIRoot no longer applies the blue accent when none is asked for, so Pop's own tomato now shows. Pass accent="blue" (or a brand) to keep blue.
  • Choice controls (since rc.15): segmented control, chip group and radio cards show their label like every field; a view switch or a quick filter passes hideLabel.

Managed 0.2 source

node /path/to/release/tools/beamline.mjs upgrade \
  --release /path/to/new-release/release.json --app /path/to/app

The tool uses the existing destination (default src/ui/beamline; repeat a custom --to). It fetches only declared selected files, verifies their hashes and stages a whole-selection transaction before applying. Add --stage-only to inspect before applying, or --dry-run for a preview that leaves the app unchanged. Only explicit upgrade changes the pinned release; adding/removing roots stays at the accepted release.

Every managed file has three byte records: B, the accepted transformed upstream baseline; L, current local bytes or deletion; U, the target transformed upstream bytes or deletion. Saved hashes point to retained bytes under .beamline/blobs; hashes alone are never treated as baselines.

Scroll sideways to compare columns

Observed stateOutcome
Local bytes equal targetAccept the target baseline without rewriting the file
Upstream is unchangedPreserve the local edit or deletion without a sidecar
Local bytes equal accepted baselineReplace or remove from the staged target
Both changed, clean text mergeStage the merged bytes and retain U as the new baseline
Both changed, overlapping/binary/delete-modify conflictKeep the whole live selection unchanged and save a pending proposal
A new path already exists without ownershipReport a collision, even when bytes match
A removed helper is still imported by a surviving local editRetain and report the helper as an orphan

Git enables clean three-way text merging. Without it, both-changed files remain pending for explicit resolution. The tool never silently recreates a local deletion against changed upstream bytes. A modified file removed upstream remains pending removal.

beamline-ui.lock.json reports acceptedRelease independently from pending. Each transaction records per-file accepted/target releases and B/L/U/result hashes. Baseline blobs, source import transforms, transaction state and backups stay in .beamline; retain this directory with the managed source. The accepted release's verified descriptor/graph cache is named by manifestPath in the lock.

Resolve a pending proposal

node /path/to/release/tools/beamline.mjs status --app /path/to/app
node /path/to/release/tools/beamline.mjs resolve components/button/button.tsx \
  --use local --app /path/to/app
node /path/to/release/tools/beamline.mjs apply --app /path/to/app --install

Choose --use upstream to accept the proposed upstream bytes/deletion, or --use file --file /path/to/reviewed-merge.tsx for your merged file. --use local explicitly keeps the current live bytes/deletion while accepting U as the next upstream baseline. Resolving an ownership collision explicitly grants ownership of that path. No live source changes until all conflicts resolve and apply succeeds.

The status JSON exposes baseHash, localHash, upstreamHash and resultHash; open the corresponding .beamline/blobs/<hash> files to compare exact content. A null hash means deletion. Repeating the pending target leaves its transaction id and proposal bytes unchanged. A different target cannot overwrite it. discard abandons an unapplied proposal while retaining evidence; then request a new target.

Changed live bytes after staging prevent apply. Resolve that path explicitly or discard and replan. A conflicting caller holds the selected group, including helper changes. Imported orphan helpers remain marked in the lock until the customer removes the dependency or resolves their ownership.

Recover interruption

Before live writes, the transaction saves original local bytes, proposed results and the previous accepted lock. Each completed file write is recorded. A failed/interrupted apply leaves the accepted release unchanged until all files commit.

node /path/to/release/tools/beamline.mjs recover --rollback --app /path/to/app
# Or finish the already staged transaction:
node /path/to/release/tools/beamline.mjs recover --resume --app /path/to/app

Rollback is the default. Both choices inspect all live files first; if a customer changed a file after interruption, recovery refuses to overwrite it. Preserve that edit outside the managed folder, restore that path to its saved original or proposed bytes, and retry the chosen recovery. A completed source apply can still require a package install: deps --install retries only dependencies from the accepted source descriptor. The installer moves existing direct Beamline packages to matching target artifacts together with the source dependencies. If the target descriptor lacks an installed package, it stops and names that package; use a descriptor containing the existing selection. npm/pnpm lockfiles describe actual package resolution.

Compiled packages and legacy source

Install selected compiled packages from the new descriptor with install <id…> --upgrade --release <target> and rebuild the app. Source/package mixtures must use compatible canonical runtime/foundation packages; upgrade an existing source selection before installing packages from another release.

For a legacy 0.1 package, keep the new tarball under a distinct path and install it with the app's package manager. Never replace bytes at an existing version/digest. For a legacy source lock with hashes only, keep the original bundle and compare original/local/target files manually. The new tool refuses automatic migration without accepted baseline bytes. It never claims a requested target is already accepted.

From rc.4 the first compiled install (any root, a look, or --upgrade) rewrites a package selection made with rc.3 or earlier: the internal Beamline units it had listed in dependencies move to overrides, leaving the chosen packages (a trial app went from 81 entries to 45). Registry packages an earlier installer added (Radix, Motion, recharts, …) stay, because the tool cannot tell them from your own; remove those your code does not import. React is never changed. Then replace the per-component import "@beamline/…/styles.css" lines with the one printed beamline.css import; keeping both works but brings foundation in again.

From rc.5 a compiled install keeps its records and archives in the app's root .beamline/ instead of src/ui/beamline/.beamline/. The first command that writes (install, remove, style add) moves the records; the next install (or deps --install) repoints package.json, the lockfile and pnpm's overrides at the root archives, then deletes the old ones and any folders that leaves empty. An app that also holds editable source keeps that source and its lock where they are. Commit the root .beamline/ with the app. Editable-source state now keeps only what recovery and three-way merges need: every accepted baseline, a pending or interrupted transaction, the latest accepted transaction (its copy of the release lives once, in releases/) and proposals declined since; older transactions, release copies and their blobs are removed after each accept, discard or rollback.

pnpm archive overrides include the exact Beamline version. Installing another release adds its matching archive mappings without redirecting another version in the workspace. Unrelated overrides and workspace settings are preserved. After a package-manager failure, use deps --install for accepted source or repeat the compiled install command; source acceptance and package resolution remain separate results.

0.2 field styling

className and style address the visual field root. Input, PasswordField, SearchField and Textarea previously passed style to their native input; move native-only styles to a class and pass classNames={{ input: "my-input" }}. classNames.frame, label, description and error style the corresponding shared parts. Picker-specific names are declared in their props and metadata. Native values, input attributes and refs retain their native control target; Textarea/SearchField compose the forwarded ref with internal measurement/focus, including callback cleanup. Textarea row bounds use the actual line height, so larger type and input-slot line-height changes keep rows/maxRows consistent.

VoicePicker now applies style to its labelled wrapper; use classNames.control for the inner control row. Labelled Checkbox and Switch also apply style to the labelled wrapper; use classNames.control for the button. Their refs still address the native control. Bare Checkbox and Switch retain the button as their styling root.

Chart style, className and ref address the figure; classNames exposes documented frame, tooltip and slice-list parts where present. Plot measurements exclude customer-added padding. Chart entrances and gauge glides now follow managed motion and host-local timing tokens, without replaying a completed SVG entrance on a look change.

Customer-owned custom styles

style add stores the custom .style.json, .preset.css and appearance.ts outside the managed component tree (default src/styles/beamline). Package/source upgrades preserve them, including local edits. The app's beamline.css beside them imports the selected base look's structural stylesheet; keep that look in the upgraded package selection. Reapplying a style uses the app's accepted release and refuses to overwrite files edited since its last application. To change the style, use its editable source and style validate/style add; a new base look needs its selected package installed.

0.2 chart look resources

Charts no longer initialize all built-in SVG effects on mount. Follow the selected look's runtime setup printed by the CLI (Glass, Glow, Mono and Ink currently declare it). Applications offering every built-in look can explicitly call ensureLookFilters() from @beamline/lib-look-filters once and keep its cleanup for teardown. Selected applications import only each selected look's runtime. The reference app and gallery own this setup at their application boundary.

Unreleased: shared list state

rc.33 calls keep working. New names win; deprecated inputs warn once after mounting in development and stay silent in production. No request is made by a component. See the server-list recipe.

Scroll sideways to compare columns

Old inputNew inputCompatibility detail
Pagination totalrowCountRecords, not pages; pageCount keeps its existing unit. Explicit rowCount={null} wins over total.
Billing/AuditLog onLoadOlder, hasOlderonEndReached, hasMoreOld callbacks still return arrays that the block appends. With the new callback, the app appends. Legacy buttons remain explicit; new end-reached callbacks can load when the end becomes visible.
ChangelogFeed onLoadMoreonEndReachedhasMore keeps its name. Rejected requests require an explicit retry.
CRM scope/defaultScope/onScopeChangefilters.scope/defaultFilters.scope/onFiltersChangeFilter values are arrays: { scope: ["mine"] }.
MarketScreener screen/defaultScreen/onScreenChangefilters.screen/defaultFilters.screen/onFiltersChangeExample: { screen: ["gainers"] }.
HelpdeskInbox, TeamMembers, SupportConsole view/defaultView/onViewChangefilters.view/defaultFilters.view/onFiltersChangeDomain values stay the same. OrderHistory's orders/fills view remains a record-type switch.
ChangelogFeed filter/defaultFilter/onFilterChangefilters.tags/defaultFilters.tags/onFiltersChangeThe same tag IDs, under tags.
KnowledgeBase scalar selected/defaultSelected/onSelectedChangeopenSource/defaultOpenSource/onOpenSourceChangeArray selection uses the standard names. Old scalar calls and their string callback remain supported.
SupportConsole scalar selected/defaultSelected/onSelectedChangeopenConversation/defaultOpenConversation/onOpenConversationChangeSame distinction between the open detail and bulk selection.
AgentRuns onRetry(runId)onRetryRun(runId)The legacy callback remains an execution retry outside manual/load-error mode. New onRetry() retries the list request.
AuditLog structured onFiltersChange(AuditFilters)Standard onFiltersChange(ListFilters)Set manual, filters or defaultFilters to use the new callback; old calls retain query/areas/actor/range payloads.

On KnowledgeBase and SupportConsole, manual, selectable, array selected/defaultSelected, or the new open-record props opt into array callbacks. The old …Props interfaces retain scalar compatibility; …ListProps describes the standard array form. A controlled empty array is a real cleared selection. For AuditLog, use AuditLogListProps for the field-map callback. In a manual OrderHistory fills view, fills is a page of HistoryFillRow records with their parent order; rowCount counts fills. SocialScheduler uses queueList for its post queue while keeping its calendar and publishing callbacks. WorkflowBuilder keeps editor node selection and places the run-list props in runsList. Its onRetryRun still retries a workflow run.

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.

Was this page helpful?