feat(VNavRail): New VNavRail Component - #23094
Open
vstyler96 wants to merge 7 commits into
Open
Conversation
fixes regression after vuetifyjs#23014 related to vuetifyjs#20457 rows packages/vuetify/src/components/VDataTable/__tests__/VDataTableVirtual.spec.browser.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR adds a new
VNavRailcomponent (plus itsVNavRailItemchild), a vertical Material 3 navigation rail for switching between top-level destinations.VNavRailis a layout item (likeVBottomNavigation/VNavigationDrawer), so it anchors to the start/end edge and offsetsVMainautomatically. It supportslocation(start/end/left/right, RTL-aware),width,align,active, plus the usualcolor/bgColor/border/elevation/rounded/themeprops, andprepend/default/appendslots. When active it is elevated by default.VNavRailItemrenders the M3 item — an icon button with a label below — and:useLinkfor route-based selection (to/exact/href/replace), so the active item is derived from the current route.active-iconwhen selected, falling back toiconwhenactive-iconis not provided.variantset asVBtn(elevated,tonal,outlined,text, …, defaulttonal) andcolor, applied with the correct "on" color when active.aria-labelfromtitleon the icon button for accessibility.API docs (locale descriptions +
page-to-apimapping) are included.Markup:
Note
The markup above uses
<router-view>so route-based selection is visible. Wire the dev router (packages/vuetify/dev/router.js) with/,/page1,/page2routes to see the active pill switch as you navigate.