OptionalautoWill autofocus to the sheet.
OptionalcolorControlled override for the app (chrome) light/dark scheme. 'auto' follows the page: a
dark/light class on <html>/<body>, else the OS.
When omitted, the workbook self-sources it from the shared appearance preference
(ThemeStateKey.Mode). With no preference set it is light, unless the page puts a dark/light class
on <html>/<body> or a ThemeModeFallbackContext above says otherwise.
OptionaleditableThe app-created editor for the new always-mounted cell editor. Pass the SAME stable IEditable instance here and to the formula bar for free two-way sync; this forwards it to the sheet's editor layer.
OptionalfocusFocus the formula-bar name box (Alt+F3 / activeNameBox) — a bridge from a host shell (e.g. studio)
to the workbook-ops command, until the name box has a react home. Wired into the per-workbook
command scope's workbook commands.
OptionalgridControlled override for the grid-body scheme. 'auto' follows the page as colorScheme does.
When omitted, the grid follows colorScheme only if Enable Dark Grid
(ThemeStateKey.DarkGrid) is on, so by default it stays light in a dark app. Pass it to make the grid
dark with the page.
OptionalonCalled once the first screen has finished drawing (pictures, charts, the sheet background) and painted, or once WorkbookElementProps.renderSettleTimeout runs out. The workbook shows at this moment, so it opens whole rather than filling in piece by piece.
Fires once, after WorkbookElementProps.onWorkbookLoad (and after a returned promise resolves).
OptionalonCalled with the workbook once WorkbookElementProps.workbook resolves, and again whenever
a new input resolves to a different one. Until the first input resolves, or if an input fails,
the workbook is null; while a later input resolves, the current workbook is kept.
OptionalonCalled when the workbook first renders, before its pictures and charts have finished drawing. To reveal it, use WorkbookElementProps.onRenderSettled.
OptionalprefetchWhether features that load on first use (charts, shapes, form controls, file formats, dialogs) are loaded ahead of use once the workbook has shown, so their first use does not wait on the network.
'auto' - only while the browser reports a fast connection. Browsers that report none
(Firefox, Safari) load each feature on first use.true - on any connection but a 2g one.false - each feature on first use.Loads every module defined with defineLazyModule from @sheetxl/utils that has not opted out,
including every kind registered with MovableContentRegistry and registerMovableRenderer.
Nothing is loaded while offline or when the connection asks to save data; it resumes when the
connection changes.
OptionalpropsProps handed to every menu renderer.
OptionalpropsAllow for customizations on the floating surface used for the workbook's popups.
OptionalpropsAllow for customizations on the sheet.
OptionalpropsAllow for customizations on tabs.
OptionalpropsAllow for customizations on loading panels.
OptionalrefRef for the workbook element.
OptionalrenderRender the filter menu of a table column's button. The default renders none.
OptionalrenderRender the grid's context menu. The default renders none, and the browser's menu shows.
OptionalrenderRender the menu a right-drag of the fill handle ends in. The default renders none, and the right-drag is inert.
OptionalrenderRender the floating surface used for the workbook's own popups (e.g. context menus).
Defaults to the neutral FloatPanel; UI layers inject a themed surface (e.g. MUI Paper).
OptionalrenderRender the context menu of a chart, shape or other movable. The default renders none.
OptionalrenderRender the pane of a chart sheet, a macro sheet or a dialog sheet while it is the active tab.
OptionalrenderRender the menu of a pivot table's field button: its items to show or hide, or a page field's item to choose. The default renders none.
OptionalrenderHow long, in milliseconds after the first paint, the workbook stays hidden waiting for the first
screen to finish drawing. Whatever is still loading then appears when it is ready. 0 shows the
workbook at its first paint; Infinity waits for everything.
OptionalrenderRender the sheet tabs.
OptionalrenderCustom error panel, shown when a Promise / IWorkbookIO.ReadOptions WorkbookElementProps.workbook
fails to resolve. Defaults to a minimal message. (Studio supplies a themed panel.)
OptionalrenderAssign a custom loading panel.
OptionalrenderRender the active worksheet. Pass props.ref on to the IWorksheetElement.
OptionalshowShow the horizontal scrollbar.
OptionalshowThis doesn't influence # of tabs just the visibility of the widget.
OptionalshowShow the vertical scrollbar.
OptionaltokensToken values for this workbook, per mode and surface: the React form of a stylesheet in
@layer sxl-overrides, scoped to this instance.
<WorkbookElement
colorScheme="auto"
gridColorScheme="auto"
tokens={{
dark: {
app: { 'color-base-100': '#14102c', 'color-base-200': '#14102c', 'color-primary': '#6e9bff' },
header: { 'color-base-100': '#1a1538', 'color-base-300': '#312b55' }
}
}}
/>
OptionalundoA custom undo manager.
OptionalworkbookThe workbook to render: a live IWorkbook, a Promise for one, or
IWorkbookIO.ReadOptions to read one from a source. If omitted (or an empty object), a
default workbook is created. A promise / read-options input shows the loading panel while
resolving and the error panel (WorkbookElementProps.renderWorkbookError) on failure.
This can be accessed (once resolved) via the workbook ref.
OptionalwrapperAllows users to Wrap stage children in Top level Context.
Properties and methods available on the workbook element.
Remarks
Every
render*slot is mounted as its own component, so a renderer may call hooks. Omit a slot (or passundefined) for its default; passnullto render nothing.