You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/react/installation.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,12 @@
1
1
---
2
2
sidebar_label: Installation
3
-
title: Installing React Spreadsheet
3
+
title: React Spreadsheet installation
4
4
description: "How to install the evaluation or commercial version of DHTMLX React Spreadsheet via npm."
5
5
---
6
6
7
-
# Installing React Spreadsheet
7
+
# React Spreadsheet installation
8
+
9
+
React Spreadsheet is distributed as an npm package in three variants: a public evaluation build, a private evaluation build, and the commercial release. This page covers how to install each variant, import the required CSS stylesheet, and set up TypeScript support.
8
10
9
11
:::info Prerequisites
10
12
-[Node.js](https://nodejs.org/en/) (LTS version recommended)
Copy file name to clipboardExpand all lines: docs/react/nextjs.md
-2Lines changed: 0 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,8 +6,6 @@ description: "How to use DHTMLX React Spreadsheet in a Next.js application with
6
6
7
7
# React Spreadsheet in Next.js
8
8
9
-
## Overview
10
-
11
9
DHTMLX Spreadsheet is a client-side widget that requires access to the browser DOM. In Next.js with the App Router, server components are the default, so the spreadsheet must be wrapped in a client component using the `"use client"` directive.
Set `readonly={true}` to disable all editing at the widget level. Adding `locked: true` on cells protects them individually when the spreadsheet is not in read-only mode.
151
+
144
152
~~~tsx
145
153
const sheets:SheetData[] = [
146
154
{
@@ -160,6 +168,8 @@ const sheets: SheetData[] = [
160
168
161
169
## Imperative access via ref
162
170
171
+
Use a `SpreadsheetRef` to access the underlying widget instance for operations that don't map to declarative props, such as serializing data, triggering undo/redo, or setting the selection programmatically.
Copy file name to clipboardExpand all lines: docs/react/props.md
+22-2Lines changed: 22 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,8 @@ These props are applied immediately without destroying the widget. No data loss
44
44
45
45
## Data props
46
46
47
+
The `sheets` prop is the single source of truth for all spreadsheet content. Changes are applied incrementally: only modified cells, ranges, or settings are updated in the widget.
48
+
47
49
| Prop | Type | Description |
48
50
|------|------|-------------|
49
51
|`sheets`|[`SheetData[]`](/react/types#sheetdata)| The single source of truth for all spreadsheet data. Each entry represents a sheet with its cells, structure, and metadata. Changes are applied incrementally. |
@@ -56,25 +58,33 @@ Changing `styles` triggers a full data reload. Spreadsheet data is preserved, bu
56
58
57
59
## Search props
58
60
61
+
Controls the search bar state from outside the component. Use it together with `onSearchResults` to build a custom search UI.
62
+
59
63
| Prop | Type | Description |
60
64
|------|------|-------------|
61
65
|`search`|[`SearchConfig`](/react/types#searchconfig)| Controlled search state. Pass a `SearchConfig` object to trigger/update search. Pass `undefined` to dismiss the search bar. |
62
66
63
67
## Data loading props
64
68
69
+
Load spreadsheet data from a remote URL instead of supplying it through the `sheets` prop.
70
+
65
71
| Prop | Type | Description |
66
72
|------|------|-------------|
67
73
|`loadUrl`|`string`| URL to load spreadsheet data from. If both `loadUrl` and `sheets` are provided, `sheets` takes precedence. |
68
74
|`loadFormat`|`FileFormat`| File format hint for `loadUrl`. Default: `"json"`. |
69
75
70
76
## Theme prop
71
77
78
+
Controls the visual theme applied to the spreadsheet. Since `theme` is a runtime prop, the widget updates immediately when the value changes.
79
+
72
80
| Prop | Type | Description |
73
81
|------|------|-------------|
74
82
|`theme`|[`SpreadsheetTheme`](/react/types#spreadsheettheme)| Color theme. Built-in values: `"light"`, `"dark"`, `"contrast-light"`, `"contrast-dark"`. Also accepts custom theme name strings. See [Themes](/react/themes/). |
75
83
76
84
## Container props
77
85
86
+
Standard React DOM props applied to the wrapper `<div>` that contains the spreadsheet. Use them to control sizing and layout.
87
+
78
88
| Prop | Type | Description |
79
89
|------|------|-------------|
80
90
|`className`|`string`| CSS class name appended to the wrapper `<div>`. |
@@ -86,6 +96,8 @@ Changing `styles` triggers a full data reload. Spreadsheet data is preserved, bu
86
96
87
97
### Sheets with cell data
88
98
99
+
A full `SheetData` example with cells, row and column sizing, merged ranges, and a frozen header row.
Mark individual cells as non-editable with `locked: true`. Unlike `readonly`, this protects specific cells while leaving the rest of the sheet editable.
239
+
222
240
~~~tsx
223
241
const sheets:SheetData[] = [
224
242
{
@@ -236,6 +254,8 @@ const sheets: SheetData[] = [
236
254
237
255
### Cell validation
238
256
257
+
Pass an array of strings to `CellData.validation` to restrict the cell to a dropdown of allowed values.
Copy file name to clipboardExpand all lines: docs/react/themes.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,8 @@ description: "Apply built-in or custom themes to DHTMLX React Spreadsheet."
6
6
7
7
# React Spreadsheet themes
8
8
9
+
React Spreadsheet ships with four built-in themes and supports custom themes through CSS variables. Use the `theme` prop to select a built-in theme or apply one you have defined yourself.
10
+
9
11
## Built-in themes
10
12
11
13
The [`SpreadsheetTheme`](/react/types#spreadsheettheme) type defines four built-in themes:
@@ -19,7 +21,7 @@ You can also pass a custom theme name as a string.
19
21
20
22
## Applying a theme
21
23
22
-
Pass the `theme` prop to `ReactSpreadsheet`:
24
+
Pass the `theme` prop to `ReactSpreadsheet` with the name of the theme you want to use:
0 commit comments