motionsnack

Animated React sections that already feel finished.

Copy them into Next.js or add them with one command. Plain React and Tailwind, light and dark.

New sections, once a month

One short email when something new lands. No spam.

Library

  • Sections
  • Blocks
  • Components
  • Application UI
  • Templates

Popular

  • Hero
  • Gallery
  • Testimonials
  • Stats
  • Logos
  • FAQ

Resources

  • Installation
  • All components
  • All blocks
  • All sections
  • All application UI
  • Design system
  • Changelog
  • Pricing

Company

  • About
  • Contact
  • Terms
  • Privacy

Install

npx motionsnack add <name>Step-by-step guidehello@motionsnack.dev
Kuba Šťastný@kubastastnydev

© 2026 motionsnack. All rights reserved.

TermsPrivacy

motionsnack

motionsnack
DocsSectionsTemplatesWhat's newPricing
Get lifetime access
  1. Home
  2. Docs
  3. Components
  4. Table
  5. Sortable Table
ComponentsBlocksSectionsApplication UI
ComponentsBlocksSectionsApplication UI

Accordion

  • Spring Accordion

Alert

  • Glow Alert

Audio

  • Podcast PlayerNew
  • Voice NoteNew
  • Voice RecorderNew

Avatar

  • Avatar Stack

Badge

  • Pulse Badge

Breadcrumb

  • Slide Breadcrumb

Button

  • Chip ButtonNew
  • Glow Border Button
  • Glow ButtonNew
  • Plain ButtonNew

Calendar

  • Month Calendar

Checkbox

  • Checkbox CardsNew
  • Checkbox GroupNew
  • Chip CheckboxNew

Cropper

  • Image Cropper

Dialog

  • Spring Dialog

Dropdown

  • Command MenuNew
  • Stagger Dropdown
  • Switcher DropdownNew

File Upload

  • Drop Zone Upload

Input

  • Addon InputNew
  • Button InputNew
  • Copy InputNew
  • Date InputNew
  • Floating Label Input
  • Joined InputsNew
  • Notched Label InputNew
  • Number StepperNew
  • OTP InputNew
  • Password InputNew
  • Phone InputNew
  • Range InputNew
  • Search InputNew
  • Tag InputNew
  • Text FieldNew

Loader

  • Curtain LoaderNew
  • Greeting LoaderNew
  • Line LoaderNew
  • Meter LoaderNew
  • Split LoaderNew

Navigation Menu

  • Mobile Tab BarNew

Notification

  • Notification BellNew
  • Toast Stack

Pagination

  • Sliding Pagination

Popover

  • Spring Popover

Radio

  • Card Radio Group
  • Payment MethodNew
  • Radio GroupNew
  • Rating RadioNew

Select

  • ComboboxNew
  • Glide Select
  • Multi SelectNew
  • Rich SelectNew
  • Select FieldNew
  • Tree SelectNew

Sidebar

  • Icon RailNew

Slider

  • Glow Slider

Stepper

  • Progress Stepper

Switch

  • Billing SwitchNew
  • Switch RowNew
  • Toggle SwitchNew

Table

  • Sortable Table

Tabs

  • Sliding Tabs

Textarea

  • Auto Grow Textarea

Toggle

  • Icon ToggleNew
  • Theme ToggleNew
  • Toggle GroupNew

Tooltip

  • Follow Tooltip

Table

Sortable Table

A glass data table whose rows glide to their new places when you sort a column.

Built from Pulse Badge — installed with it.

npx motionsnack add sortable-table

Customize

<SortableTable />

Props

29 properties

PropertyTypeDefaultDescription
columns{ key: string; label: string; align?: 'start' | 'center' | 'end'; sortable?: boolean; width?: number | string }[]4 demo columnsColumns, start to end. Numbers, money and dates align end.
rowsRecord<string, string | number>[]6 demo rowsRows as plain objects keyed by the column keys, each with a unique rowKey field. Values like '$12,400' sort as numbers.
statusTonesRecord<string, 'success' | 'warning' | 'error' | 'neutral'>{ Active, Paused, Draft }Status of a badge by its value.
sort{ key: string; direction: 'ascending' | 'descending' } | null-Sort. With a value (or null) the component is controlled.
defaultSort{ key: string; direction: 'ascending' | 'descending' } | nullnullSort at the start when uncontrolled.
onSortChange(sort | null) => void-Called after a header click.
selectionstring[]-Selected row keys. With a value the selection is controlled.
defaultSelectionstring[][]Selected row keys at the start when uncontrolled.
onSelectionChange(keys: string[]) => void-Called with the selected row keys after a user change.
onRetry() => void-Called by the Retry button of the error row.
labelsSortableTableLabelsEnglishCount, caption note, announcements, checkbox names, empty-cell text.
localestring'en-US'BCP 47 locale of sorting and counts.
accentstring-Deprecated, ignored: the sort arrow is monochrome.
radiusnumber-Deprecated, ignored: the frame is radius 16.
rowHeightnumber-Deprecated: use height.
minWidthnumber-Deprecated, ignored: columns are at least 80 wide.
hoverHighlightboolean-Deprecated, ignored.
durationnumber-Deprecated, ignored.
bouncenumber-Deprecated, ignored.
classNamestring''Extra classes on the frame.
captionstring'Projects'Title above the table, also the table caption. Empty hides the title bar.
rowKeystring'id'Field that identifies a row.
statusKeystring'status'Column key whose values are drawn as status badges. Empty turns them off.
height'40' | '48''40'Row height; the header matches.
selectablebooleanfalseCheckbox column for row selection.
stickyHeaderbooleanfalseHeader sticks to the top of the scroll container.
loadingbooleanfalseSkeleton without rows, dimmed rows otherwise.
errorstring''Error message: replaces the body with one row.
emptyTextstring'No results'Text of the empty body.

About Sortable Table

Sortable Table takes plain column definitions and an array of row objects and renders them in a glass card. Clicking a header sorts by that column: the first click ascending, the second descending, the third back to the original order. Instead of snapping, every row travels to its new position on a spring while the sort arrow rotates and takes the accent colour. A soft highlight follows the pointer from row to row, and one column can be drawn as status pills with coloured dots. Values such as prices and percentages sort as numbers, and the table scrolls sideways when the space gets too narrow.

What's included

  • Rows glide to their new order with a spring layout animation
  • Three-step sort per column: ascending, descending, original
  • Rotating sort arrow in the accent colour
  • Hover highlight that follows the pointer between rows
  • Optional status pill column with tone colours
  • Controlled or uncontrolled sort with onSortChange
  • Horizontal scroll on narrow widths, light and dark looks
Type
Animated React table component
Library
Components · Table
Stack
Next.js, React, Tailwind CSS
Added
2026-09-20
Install
npx motionsnack add sortable-table