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
{{ message }}
Repository navigation
Commit c5b99e0
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/routing.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -78,6 +78,27 @@ def on_login_success(self, e):
78
78
79
79
This method updates the browser hash, ensuring that the **Back/Forward buttons** continue to work as expected.
80
80
81
+
## Active Route Styling (`router.path`)
82
+
83
+
The `router.path` attribute is a reactive `State("")` that always reflects the current route. Use it in lambda attributes to **automatically highlight active navigation links** or tabs:
Since `path` is a standard htag `State`, it integrates with the full reactivity system — any component observing it will re-render automatically when the route changes.
101
+
81
102
## Custom 404 Pages
82
103
83
104
If no route matches the current path, a default "404 Not Found" message is displayed. You can customize this by providing your own component:
0 commit comments