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
+13-4Lines changed: 13 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,11 +44,10 @@ export default function RootLayout({ children }: { children: React.ReactNode })
44
44
}
45
45
```
46
46
47
-
Use `Link` component form `next13-progressbar` in your entire app instead of native `next/link`to navigate with progressbar
47
+
By default all `a` tags are handled by `next/link`so you don't need to do anything.
48
48
49
49
```jsx
50
-
'use client';
51
-
import { Link } from'next13-progressbar';
50
+
importLinkfrom'next/link';
52
51
53
52
exportdefaultfunctionNavBar() {
54
53
return (
@@ -61,8 +60,18 @@ export default function NavBar() {
61
60
}
62
61
```
63
62
63
+
But if you want to use `Link` component from `next13-progressbar` you can do it by importing it from `next13-progressbar` and use it as you would use `next/link` component.
64
+
65
+
```jsx
66
+
'use client';
67
+
import { Link } from'next13-progressbar';
68
+
69
+
// use it as you would use next/link
70
+
```
71
+
64
72
And you are done. You can now customize you progress bar as you need!
65
-
⚠️ Note: You must use `Link` component inside client components only.
73
+
74
+
⚠️ Note: You must use `next13-progressbar``Link` component inside client components only.
0 commit comments