ns-ui

View Toggle Rails

List/grid/board view switcher that draws a faint curved rail from every item's old slot to its new one and lets it ride that exact rail, releasing cards in reading order like cars cut loose over a classification-yard hump.

Use when switching between list, grid and board views of one data set where the transition should be a legible diagram of where each item went, every card riding a drawn rail from its old slot to its new one; it is the wrong choice for switching which content is shown rather than how it is arranged (tabs-notch-tenon and tabs-carriage do that) and for a control that changes a filter without moving anything (segmented-control-fling).

Install

npx shadcn add https://design.helpmarq.com/r/view-toggle-rails.json
  • layout
  • transition
  • flip
  • view-toggle
  • kanban
  • svg
  • radio-group

ns-ui / view-toggle-rails — every card gets its own rail

Tasks
Design review
Mara Chen
To do
Update pricing page
Jonas Weber
To do
Fix mobile nav overlap
Aiko Tanaka
To do
Draft Q3 roadmap
Sam Okafor
To do
Accessibility pass
Lena Fischer
To do
Migrate auth service
Ravi Patel
In progress
Refactor billing module
Nora Lindqvist
In progress
Customer interview notes
Mara Chen
In progress
Investigate flaky test
Jonas Weber
In progress
Prepare demo deck
Aiko Tanaka
In progress
Write changelog
Sam Okafor
Done
Set up staging env
Ravi Patel
Done
Onboarding flow audit
Lena Fischer
Done
Backfill analytics events
Nora Lindqvist
Done

Switch between List, Grid and Board. Faint rails trace each card's exact path between layouts, releasing in reading order like cars cut loose over a hump, then fade once their card has docked.

Props

PropTypeDefaultDescription
items?HumpYardItem[]The data set. Same items are reused across all three views.
defaultView?ViewModeUncontrolled initial view. @default "list"
view?ViewModeControlled view.
onViewChange?(view: ViewMode) => void
aria-label?stringAccessible name for the item collection, e.g. "Tasks".
className?string