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: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,18 @@ const App = () => {
52
52
options: {
53
53
highLightPadding:12,
54
54
infoBoxHeight:220,
55
+
infoBoxWidth:'24rem',
55
56
infoBoxMargin:24,
57
+
overlayColor:'rgba(15, 23, 42, 0.6)',
58
+
highlightBorderColor:'#22c55e',
59
+
highlightBorderRadius:16,
60
+
zIndex:3000,
61
+
labels: {
62
+
prev:'Back',
63
+
next:'Continue',
64
+
skip:'Dismiss',
65
+
done:'Finish',
66
+
},
56
67
keyboardNavigation:true,
57
68
closeOnOverlayClick:true,
58
69
onClose: () => {
@@ -87,6 +98,10 @@ const App = () => {
87
98
88
99
`highLightPadding` expands the highlight frame around the target element. It defaults to `8` pixels and applies to the rendered highlight box as well as the info box anchor position.
89
100
101
+
Use `overlayColor`, `highlightBorderColor`, `highlightBorderRadius`, `zIndex`, and `infoBoxWidth` to match the built-in UI to your product without changing the overlay, highlight, or info box structure. When omitted, the existing defaults remain in place.
102
+
103
+
Use `labels` to override the built-in button text. The default labels are `이전`, `다음`, `건너뛰기`, and `완료`.
104
+
90
105
Keyboard navigation is enabled by default while the overlay is open:
Copy file name to clipboardExpand all lines: packages/document/src/pages/docs/tutorial-overlay.mdx
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,6 +28,10 @@ Because `tutorial.open()` returns a Promise, you can keep `<TutorialOverlay />`
28
28
29
29
The highlight frame uses `options.highLightPadding` to expand around the target. If you do not provide it, the overlay uses an `8px` padding by default.
30
30
31
+
Visual customization stays global for now. Use `options.overlayColor`, `options.highlightBorderColor`, `options.highlightBorderRadius`, `options.zIndex`, and `options.infoBoxWidth` when you need the built-in overlay UI to better match your product chrome.
32
+
33
+
Use `options.labels` to replace the built-in `이전`, `다음`, `건너뛰기`, and `완료` button text without replacing the UI itself.
34
+
31
35
By default, the mounted overlay listens for `Escape`, `ArrowLeft`, and `ArrowRight` while it is open. You can disable that with `options.keyboardNavigation = false`.
32
36
33
37
Backdrop clicks are ignored by default. Set `options.closeOnOverlayClick = true` if you want clicking the dimmed overlay area to close the tutorial.
0 commit comments