DEV Community

Cover image for Introducing shadcn-data-views: Instant Kanban, Grid, and Calendar for your Data with a Single JSON Schema
Lotfi Bennour
Lotfi Bennour

Posted on

Introducing shadcn-data-views: Instant Kanban, Grid, and Calendar for your Data with a Single JSON Schema

๐Ÿ˜“ The "Data View" Fatigue

Weโ€™ve all been there. You start building a new SaaS or an internal admin tool. It starts simple, but then the requirements roll in:

"Can we see this data as a Kanban board?"

"We need a Calendar view for the deadlines."

"Can you add a form to edit these records?"

"Make it look modern and handle Dark Mode."

Suddenly, youโ€™re spending weeks glueing together five different libraries for tables, drag-and-drop, and calendars.

There has to be a better way.


โœจ Introducing shadcn-data-views

I built shadcn-data-views to solve exactly this problem.

It is a powerful, schema-driven component for React that instantly generates polished, complex data interfaces. By defining a single JSON schema, you get five different synchronized views out of the box.


๐Ÿ† Why use this over other libraries?

Most data grid libraries give you a table and stop there.

shadcn-data-views gives you an entire ecosystem for your data.


๐Ÿ”น 1. One Schema, Five Views

Define your data structure once (fields, types, selects), and the component automatically renders:

  • ๐Ÿ“‹ Grid View โ€” A powerful spreadsheet-like table
  • ๐Ÿ—๏ธ Kanban View โ€” Drag-and-drop status management
  • ๐Ÿ–ผ๏ธ Gallery View โ€” A clean card-based layout
  • ๐Ÿ“… Calendar View โ€” Visualize dates and schedules
  • ๐Ÿ“ Form View โ€” Auto-generated forms for creating/editing records

๐Ÿ”น 2. Backend Agnostic

You provide the dbClient.

Supabase, Firebase, REST APIs, or LocalStorage are supported.

You control the data fetching; we handle the UI.


๐Ÿ”น 3. It actually looks good (shadcn/ui style)

Modern aesthetics with native Dark Mode support via next-themes.

Clean typography and subtle gradients.


๐Ÿ”น 4. Global Ready ๐ŸŒ

Built-in support for 10 languages with automatic RTL handling.

5. Screenshots

Grid View with Filters

Form View

Kanban View

Galery View

Calendar View


๐Ÿ’ป How it works

1๏ธโƒฃ Install

npm install shadcn-data-views
Enter fullscreen mode Exit fullscreen mode

2๏ธโƒฃ Define your Schema

import { TableSchema } from 'shadcn-data-views';

const mySchema = {
  id: 'tasks',
  name: 'Tasks',
  icon: '๐Ÿ“‹',
  fields: [
    { id: 'title', name: 'Title', type: 'text', isPrimary: true },
    {
      id: 'status',
      name: 'Status',
      type: 'select',
      options: [
        { id: 'todo', name: 'To Do', color: 'gray' },
        { id: 'done', name: 'Done', color: 'green' }
      ]
    },
    { id: 'dueDate', name: 'Due Date', type: 'date' }
  ]
};
Enter fullscreen mode Exit fullscreen mode

3๏ธโƒฃ Render the Component

import { DataViews } from 'shadcn-data-views';

export default function App() {
  return (
    <div className="h-screen w-full">
      <DataViews
        schema={mySchema}
        dbClient={myDbClient}
        config={{ defaultView: 'kanban' }}
      />
    </div>
  );
}
Enter fullscreen mode Exit fullscreen mode

Thatโ€™s it.

A fully functional Kanban, Grid, and Calendar view instantly available.


๐ŸŽจ Color & Customization

Includes 50+ preset colors (Emerald, Amber, Rose, Violet).

import { PRESET_COLORS } from 'shadcn-data-views';
Enter fullscreen mode Exit fullscreen mode

๐Ÿš€ Try it out

โญ Star the repo if useful.

Happy coding!

Top comments (0)