Skip to main content

UI Components

SheetXL's UI is built from a set of composable React Components. These can be used as standalone components or assembled together to support a complete spreadsheet experience.

An overview of the Studio component is shown below:

<Studio/><WorkbookElement/><NamedInput/><FormulaBar/><SheetCellEditor/><StatusBar/><SheetZoomScale/><WorkbookToolbars/><SheetElement/><SheetCellEditor/><CellTextRenderer/><WorkbookStrip/>

Spreadsheet Components​

ComponentPackageDescription
Studiostudio-muiFully functional application that can be easily embedded and/or extended using Material-UI and React.
WorkbookElementreactAccepts a Workbook and displays an IWorksheet and other editing artifacts.
WorkbookToolbarsstudio-muiA collection of toolbars that contain CommandButtons.
FormulaBarstudio-muiThe formula bar: a wrapper around the cell editor.
FormulaFieldstudio-muiA field whose value is a formula or a range reference, pickable from the grid.
WorksheetElementreactShows a sheet's cells, headers, and editing layers.
CellTextRendererreactPaints an ICell's value as text, as the sheet shows it.
SheetCellEditorLayerreactThe layer that edits an ICell in place.
WorkbookStripreactContains a set of WorkbookTabs to allow navigation between Sheets.
StatusBarstudio-muiA collection of status bar items.
SheetZoomScalestudio-muiAn editor for adjusting zoom scale.
InputFieldstudio-muiA validated text field with live/commit change channels.

Advanced Components​

Components that are designed to be used standalone but provide advanced editing capabilities found in spreadsheets.

All of these are in @sheetxl/studio-mui.

ComponentDescription
FindReplaceWindowFind/Replace items in the Workbook.
NumberFormatPanelNumber Format Edit and Preview.
HyperlinkDialogHyperlink editor.
CommentsTaskPaneComments editor.
SortDialogAdvanced and multi-level sorting.
ThemeSelectPanelFor previewing or selecting current theme from a list of predefined themes.
ShortcutKeysPanelDisplay the shortcut keys associated with a CommandGroup.
ResizeHeaderDialogAllows for resizing of row and column headers.
TableNewDialogSimple table creation.
TableDetailsTaskPaneAdvanced table editing.
ColorPanelColor-chooser that is theme aware.
PresetCellStylesCommandButtonFor previewing, selecting, and modifying predefined styles.

Container Types​

SheetXL has 3 main container types.

ContainerDescriptionWhere
DialogA modal dialog that blocks the UI until dismissed.OptionsDialog, useInputDialog in @sheetxl/utils-mui
TaskPaneA side pane container that can be collapsed and is expected to be 'selection aware'.TaskPaneArea, useTaskPane in @sheetxl/react
WindowA floating window container that can be moved and resized.InternalWindow, useLazyWindow in @sheetxl/utils-mui

Notification Types​

Notifications go through the useNotifier hook in @sheetxl/utils-react.

NotificationDescription
ToastAlerts that appear temporarily and do not block the UI.
BusyA blocking indicator for operations that require the user to wait (createBusyHandle).
ErrorAn unexpected runtime error with details for debugging (StackTraceErrorPanel in @sheetxl/utils-mui).

Common Dialogs​

DialogDescription
useInputDialogConfigurable input dialog, used for 'Goto', 'Rename', confirmation prompts, and other simple inputs.
OptionsDialogConfigurable options dialog for easily presenting a set of options.

Configuring Components​

Like all React components SheetXL components are configured using properties; see API Reference for the specific properties available for each component. Most components also support the ref property; when they do they always expose the underlying component and additional imperative API calls as defined in the Typescript interface following the convention <Component>Attributes.

App Themes​

SheetXL has two kinds of theme:

  1. App themes color the UI: the grid, headers, tabs, menus. You set them with CSS variables or the tokens prop, and with muiTheme if you use Studio.
  2. Document themes are part of the workbook file (the colors and fonts it was saved with). They travel with the data.

Everything about app themes, including light and dark, matching your page, and the full token list, is on the Theming page.

App theme extensions​

SheetXL has a thin layer of customized MUI components known as 'Exhibit Components'. These extend MUI components to provide functionality and styling needed for SheetXL. The Exhibit Components are MIT open-sourced and can be found at github.

Document Themes​

Document Themes are part of the data, so they are saved with the workbook and managed through ITheme rather than CSS.