@@ -52,7 +52,7 @@ import { DocsLayout } from 'fumadocs-ui/layouts/docs';
5252
5353Customise sidebar navigation links.
5454
55- <div className = ' flex justify-center items-center *:max-w-[200px] bg-gradient -to-br from-fd-primary/10 rounded-xl border' >
55+ <div className = ' flex justify-center items-center *:max-w-[200px] bg-linear -to-br from-fd-primary/10 rounded-xl border' >
5656
5757 ![ Sidebar] ( /docs/sidebar.png )
5858
@@ -100,13 +100,13 @@ export default function Layout({ children }: { children: ReactNode }) {
100100}
101101```
102102
103- ### Sidebar Tabs (Dropdown) [ #sidebar -tabs]
103+ ### Layout Tabs (Dropdown) [ #layout -tabs]
104104
105- Sidebar Tabs are folders with tab-like behaviours, only the content of opened tab will be visible.
105+ Layout Tabs are folders with tab-like behaviours, only the content of opened tab will be visible.
106106
107107<div className = ' flex justify-center items-center *:max-w-[360px] bg-linear-to-br from-fd-primary/10 rounded-xl border' >
108108
109- ![ Sidebar Tabs] ( /docs/sidebar-tabs.png )
109+ ![ Layout Tabs] ( /docs/sidebar-tabs.png )
110110
111111</div >
112112
@@ -128,19 +128,17 @@ Or specify them explicitly:
128128import { DocsLayout } from ' fumadocs-ui/layouts/docs' ;
129129
130130<DocsLayout
131- sidebar = { {
132- tabs: [
133- {
134- title: ' Components' ,
135- description: ' Hello World!' ,
136- // active for `/docs/components` and sub routes like `/docs/components/button`
137- url: ' /docs/components' ,
138-
139- // optionally, you can specify a set of urls which activates the item
140- // urls: new Set(['/docs/test', '/docs/components']),
141- },
142- ],
143- }}
131+ tabs = { [
132+ {
133+ title: ' Components' ,
134+ description: ' Hello World!' ,
135+ // active for `/docs/components` and sub routes like `/docs/components/button`
136+ url: ' /docs/components' ,
137+
138+ // optionally, you can specify a set of urls which activates the item
139+ // urls: new Set(['/docs/test', '/docs/components']),
140+ },
141+ ]}
144142/>;
145143```
146144
@@ -149,7 +147,7 @@ Set it to `false` to disable:
149147``` tsx
150148import { DocsLayout } from ' fumadocs-ui/layouts/docs' ;
151149
152- <DocsLayout sidebar = { { tabs: false } } />;
150+ <DocsLayout tabs = { false } />;
153151```
154152
155153<Callout title = " Want further customisations?" >
@@ -182,19 +180,17 @@ export default function Layout({ children }: { children: ReactNode }) {
182180
183181#### Decoration
184182
185- Change the icon/styles of tabs.
183+ Change the icon/styles of layout tabs.
186184
187185``` tsx
188186import { DocsLayout } from ' fumadocs-ui/layouts/docs' ;
189187
190188<DocsLayout
191- sidebar = { {
192- tabs: {
193- transform : (option , node ) => ({
194- ... option ,
195- icon: <MyIcon />,
196- }),
197- },
189+ tabs = { {
190+ transform : (option , node ) => ({
191+ ... option ,
192+ icon: <MyIcon />,
193+ }),
198194 }}
199195/>;
200196```
0 commit comments