diff --git a/docs/demo/ssr-off.md b/docs/demo/ssr-off.md
new file mode 100644
index 00000000..085f9244
--- /dev/null
+++ b/docs/demo/ssr-off.md
@@ -0,0 +1,3 @@
+## ssr off
+
+
diff --git a/docs/examples/ssr-off.tsx b/docs/examples/ssr-off.tsx
new file mode 100644
index 00000000..059dfa00
--- /dev/null
+++ b/docs/examples/ssr-off.tsx
@@ -0,0 +1,71 @@
+import React from 'react';
+import '../../assets/index.less';
+import Menu, { Divider, Item as MenuItem, SubMenu } from '../../src';
+
+const nestSubMenu = (
+ offset sub menu 2}
+ key="4"
+ popupOffset={[10, 15]}
+ >
+
+
+ sub menu 1}
+ >
+ sub 4-2-0}
+ key="4-2-0"
+ >
+
+
+
+
+ sub menu 4}
+ key="4-2-2"
+ >
+
+
+
+ sub menu 3}
+ key="4-2-3"
+ >
+
+
+
+
+
+);
+
+function handleClick(info) {
+ console.log(`clicked ${info.key}`);
+ console.log(info);
+}
+
+function Demo() {
+ return (
+ <>
+
+ >
+ );
+}
+
+export default Demo;
diff --git a/src/Menu.tsx b/src/Menu.tsx
index ef9db196..d116a6d3 100644
--- a/src/Menu.tsx
+++ b/src/Menu.tsx
@@ -78,6 +78,9 @@ export interface MenuProps
activeKey?: string;
defaultActiveFirst?: boolean;
+ // SSR control
+ ssr?: 'full' | 'off';
+
// Selection
selectable?: boolean;
multiple?: boolean;
@@ -183,6 +186,9 @@ const Menu = React.forwardRef((props, ref) => {
activeKey,
defaultActiveFirst,
+ // SSR
+ ssr,
+
// Selection
selectable = true,
multiple = false,
@@ -239,6 +245,7 @@ const Menu = React.forwardRef((props, ref) => {
const uuid = useUUID(id);
const isRtl = direction === 'rtl';
+ const ssrVal = ssr === 'off' ? undefined : 'full';
// ========================= Warn =========================
if (process.env.NODE_ENV !== 'production') {
@@ -581,7 +588,7 @@ const Menu = React.forwardRef((props, ref) => {
? Overflow.INVALIDATE
: Overflow.RESPONSIVE
}
- ssr="full"
+ ssr={ssrVal}
data-menu-list
onVisibleChange={newLastIndex => {
setLastVisibleIndex(newLastIndex);