WingoUI
Buttons & Actions
ButtonButton GroupCopy ButtonDelete ButtonTheme ToggleToggleToggle Group
Inputs
Avatar UploadCalendarCheckboxColor PickerComboboxCron PickerCurrency InputDate PickerDate Range PickerDate Time PickerDuration PickerFile UploadFilter BuilderInputInput GroupListboxMasked InputMention InputMonth PickerMulti SelectNumber InputOTP InputPassword InputPhone InputRadio GroupRatingSearch InputSegmented ControlSelectSignature PadSliderSwitchTag InputTextareaTime Picker
Forms
Address InputCSV ImportFieldForm WizardInline EditInvoice line itemsRich Text Editor
Navigation
Back To TopBounce SidebarBreadcrumbCommand MenuGlobal SearchGooey NavHook SidebarNav MenuNav TabsPaginationProximity SidebarScroll ProgressSidebarStepsTable Of ContentsTabsTopbarUser MenuWorkspace Switcher
Overlays
Alert DialogContext MenuDialogDrawerDropdown MenuFamily DrawerHover CardPopoverSheetShortcuts DialogTooltipTour
Feedback
AlertBannerCookie ConsentEmoji ReactionEmpty StateNotification BellNotification CenterProgressRoute ProgressSkeletonSpinnerToast
Data Display
Approval FlowAvatarBadgeCalendar ViewCode BlockComment ThreadContact cardCountdownDescription ListDiff ViewerFile ListFile managerFolderGanttJSON ViewerKbdLog ViewerMarkdownPresenceSchedulerTagTimelineTree View
Tables & Lists
Audit LogData TableDeal PipelineEditable GridKanbanListMembers tablePermissions MatrixTableTask ListVirtual List
Charts & Stats
Animated CounterArea chartBar chartDonut chartFunnel chartGaugeGitHub ActivityHeatmap calendarLeaderboardLine chartRadial barSparklineStat CardTrackerTrend badge
Layout
AccordionApp ShellCardCollapsibleDetail LayoutEntity HeaderPage HeaderScroll AreaSeparatorSettings LayoutSplit ViewToolbar
Media
Audio PlayerCarouselImage CropperImage LightboxLocation MapQR CodeStep PlayerVideo Player
AI Kit
Agent Status CardChat MessageChat ThreadConversation ListFluid OrbGrid RevealMatrix OrbModel PickerPrompt InputReasoning IndicatorRule BuilderSuggestion ChipsTool Call TimelineUsage MeterVoice InputWorkflow Canvas
Text & Effects
Gravity Letters
Mobile
Action SheetBottom Tab BarFABHaptic ButtonHero HeaderInstall PromptLarge Title HeaderNotification BannerOnboarding CarouselPicker WheelPull To RefreshSlide To ConfirmSticky CTA BarSwipe DeckSwipeable Tabs
Commerce
Cart drawerCategory pickerCheckout stepsCoupon inputFavorite buttonFilter panelListing cardListing gridOrder trackerPricePrice rangePricing tableProduct galleryQuantity stepperReviewsSeller card
Blocks
Admin Dashboard PageAdmin ShellAI Chat PageAutomation Builder PageCheckout PageCRM Contact PageCRM Pipeline PageError PagesInbox PageInvoice PageKPI DashboardListing Detail PageLogin PageMarketplace Home PageMarketplace Search PageMarketplace ShellMobile App HomeOnboarding FlowPost Listing WizardPricing PageRegister PageSettings PageUsers Admin Page
Hooks & Utilities
AI ChatChart kitCommerceDate utilsFile exportFile typesFiltersForm validationHapticsInvoicingMotion presetsNavigationNumber formatRelative timeRomanian locationsSpreadsheetText matchTonesUIProvideruseClipboarduseConsentuseControllableStateuseCooldownuseDebounceuseKeyboardInsetuseLocaleuseLongPressuseMediaControlsuseMediaQueryuseOverflowItemsusePersistedStateuseScrollEdgesuseScrollStateuseSelectionuseShortcutuseStickToBottom
GalleryThemeCredits

Navigation

Hook Sidebar

NavigationHook Sidebar
Gooey NavNav Menu
Live props
Content
label
Appearance
color
dashed
size
textColor
activeTextColor
hoverColor
gap2px
cornerRadius6px
Code
import { HookSidebar } from "@/components/ui/hook-sidebar"

<HookSidebar />
FreeRare UI

v1.0.0·Added in 1.0.0

A vertical navigation list with a dashed rail that hooks into the active item.

Click an item to spring the accent rail down to it. Hovering or tabbing to another row draws a second, dimmer rail that stops where the accent one ends. When the items have hrefs, the rail follows the current route on its own.

Add to a project

npx wingo-ui@latest add hook-sidebar

Dependencies

motionmotionui-config

Files

  • components/ui/hook-sidebar.tsx
PreviousGooey NavNext Nav Menu

Hook Sidebar

A section list whose rail bends into the entry you are reading.

Overview

The hook sidebar is a vertical list of sections with a thin rail running down its left edge. Where the rail meets the active entry it hooks in toward the label, so the current place in the page is drawn as part of the line itself.

When to use it

It suits documentation, long settings pages and anything with a handful of named sections. Several sidebars can stack, one per group, with only the group that holds the selection showing its accent.

Why it exists

A highlighted row competes with the content for attention. A rail that bends toward the active entry marks it clearly while leaving the text itself untouched.

Motion

Selecting another entry springs the accent rail down or up to meet it, and the hook reforms beside the new label.

Hover preview

Hovering or tabbing to a different row draws a second, dimmer rail from the active entry toward it. It shows where a click would take you before you commit to it.

Following the page

Drive the value from the scroll position, as this demo does, and the rail tracks the section being read. With hrefs on the items it follows the current route instead.

Anatomy

An optional label heads the list. Below it, each entry is a button or a link, and the neutral rail, the hover rail and the accent rail with its hook are drawn along their left edge.

Dashed or solid

The rail is dashed by default, which keeps it light next to body text. Set dashed to false for a continuous line when the sidebar sits on its own.

Accent color

Pass any CSS color to color. It tints the accent rail, while the hover rail stays neutral so the two never get confused.

Accessibility

Entries are real buttons or links, so the list works with Tab, Enter and Space. The group label names the navigation for screen readers, and the rail is decorative and hidden from them.

Contrast

Inactive entries use a softer text color and the active one the full text color, so the accent only has to stand out as a line and never carries the text itself.

Credits

The hook sidebar comes from Rare UI by Swami Malode and is part of UI Lab, where it sits next to the bounce sidebar and the proximity sidebar.

Further reading

The bounce sidebar marks the active entry with a hopping dot, and the proximity sidebar turns the whole page into a minimap of dashes. Pick whichever matches how much space you have.