Convert Figma logo to code with AI

jd-opensource logodrip-table

A tiny and powerful enterprise-class solution for building lowcode tables. 轻量、强大的企业级表格可视化搭建解决方案。

1,481
130
1,481
61

Top Related Projects

11,356

📱🚀 🧩 Cross Device & High Performance Normal Form/Dynamic(JSON Schema) Form/Form Builder -- Support React/React Native/Vue 2/Vue 3

🚴‍♀️ 阿里 - 很易用的中后台「表单 / 表格 / 图表」解决方案

👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!

25,387

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table

13,037

The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.

Quick Overview

Drip Table is an open-source React component library for building configurable and efficient tables. It provides a powerful and flexible solution for creating complex table layouts with features like drag-and-drop, custom rendering, and dynamic data handling.

Pros

  • Highly customizable with a wide range of built-in components and layouts
  • Supports drag-and-drop functionality for easy table reorganization
  • Efficient rendering and performance optimization for large datasets
  • Extensive documentation and examples for easy implementation

Cons

  • Steep learning curve for advanced customizations
  • Limited built-in theming options, requiring additional styling effort
  • Dependency on React ecosystem may limit usage in other frameworks
  • Some features may require additional configuration or plugins

Code Examples

  1. Basic table setup:
import { DripTable } from 'drip-table';

const columns = [
  { key: 'name', title: 'Name' },
  { key: 'age', title: 'Age' },
];

const dataSource = [
  { name: 'John Doe', age: 30 },
  { name: 'Jane Smith', age: 25 },
];

function MyTable() {
  return <DripTable columns={columns} dataSource={dataSource} />;
}
  1. Custom cell rendering:
import { DripTable } from 'drip-table';

const columns = [
  {
    key: 'name',
    title: 'Name',
    render: (text, record) => <a href={`/profile/${record.id}`}>{text}</a>,
  },
  { key: 'age', title: 'Age' },
];

function MyTableWithCustomCells() {
  return <DripTable columns={columns} dataSource={dataSource} />;
}
  1. Drag-and-drop functionality:
import { DripTable } from 'drip-table';

function DraggableTable() {
  return (
    <DripTable
      columns={columns}
      dataSource={dataSource}
      dragSortable
      onDragSortEnd={(newDataSource) => {
        // Handle the new order of data
        console.log(newDataSource);
      }}
    />
  );
}

Getting Started

To use Drip Table in your React project, follow these steps:

  1. Install the package:

    npm install drip-table
    
  2. Import and use the component in your React application:

    import React from 'react';
    import { DripTable } from 'drip-table';
    
    const columns = [
      { key: 'name', title: 'Name' },
      { key: 'age', title: 'Age' },
    ];
    
    const dataSource = [
      { name: 'John Doe', age: 30 },
      { name: 'Jane Smith', age: 25 },
    ];
    
    function App() {
      return (
        <div>
          <h1>My Table</h1>
          <DripTable columns={columns} dataSource={dataSource} />
        </div>
      );
    }
    
    export default App;
    

This basic setup will render a simple table with the provided columns and data. You can further customize the table by adding more props and configurations as needed.

Competitor Comparisons

11,356

📱🚀 🧩 Cross Device & High Performance Normal Form/Dynamic(JSON Schema) Form/Form Builder -- Support React/React Native/Vue 2/Vue 3

Pros of Formily

  • More comprehensive form solution with advanced features like dynamic fields and complex validations
  • Larger community and ecosystem with extensive documentation and examples
  • Better integration with popular UI libraries like Ant Design and Element

Cons of Formily

  • Steeper learning curve due to its complexity and extensive API
  • Potentially overkill for simpler form requirements
  • Less focused on table-specific functionality compared to Drip Table

Code Comparison

Formily:

import { createForm } from '@formily/core'
import { Field } from '@formily/react'

const form = createForm()
<Field name="username" component="Input" />

Drip Table:

import { DripTable } from 'drip-table'

<DripTable
  schema={tableSchema}
  dataSource={dataSource}
/>

Summary

Formily is a more comprehensive form solution with advanced features and better integration with popular UI libraries. However, it has a steeper learning curve and may be overkill for simpler requirements. Drip Table, on the other hand, is more focused on table-specific functionality and may be easier to implement for basic table needs. The choice between the two depends on the specific requirements of your project and the complexity of the forms or tables you need to create.

🚴‍♀️ 阿里 - 很易用的中后台「表单 / 表格 / 图表」解决方案

Pros of x-render

  • More comprehensive form rendering capabilities, including complex layouts and nested structures
  • Extensive documentation and examples, making it easier for developers to get started
  • Larger community and more frequent updates, potentially leading to better long-term support

Cons of x-render

  • Steeper learning curve due to its more complex architecture and feature set
  • Potentially heavier bundle size, which may impact performance in smaller applications
  • Less focused on table-specific functionality compared to drip-table

Code Comparison

x-render:

import { FormRender, useForm } from 'form-render';

const schema = {
  type: 'object',
  properties: {
    name: { type: 'string', title: 'Name' },
    age: { type: 'number', title: 'Age' }
  }
};

const MyForm = () => {
  const form = useForm();
  return <FormRender form={form} schema={schema} />;
};

drip-table:

import { DripTable } from 'drip-table';

const schema = {
  columns: [
    { key: 'name', title: 'Name' },
    { key: 'age', title: 'Age' }
  ]
};

const MyTable = () => {
  return <DripTable schema={schema} dataSource={data} />;
};

👨🏻‍💻👩🏻‍💻 Use Ant Design like a Pro!

Pros of Ant Design Pro

  • More comprehensive UI component library with a wider range of pre-built components
  • Extensive documentation and community support
  • Integrated with popular state management and routing solutions

Cons of Ant Design Pro

  • Steeper learning curve due to its complexity and extensive features
  • Potentially heavier bundle size for smaller projects
  • Less flexibility for custom table configurations compared to Drip Table

Code Comparison

Ant Design Pro (Table component):

import { Table } from 'antd';

const columns = [
  { title: 'Name', dataIndex: 'name', key: 'name' },
  { title: 'Age', dataIndex: 'age', key: 'age' },
];

<Table columns={columns} dataSource={data} />

Drip Table:

import { DripTable } from 'drip-table';

const schema = {
  columns: [
    { key: 'name', title: 'Name' },
    { key: 'age', title: 'Age' },
  ],
};

<DripTable schema={schema} dataSource={data} />

Both libraries offer table components, but Drip Table focuses on providing a more flexible and customizable table solution, while Ant Design Pro offers a broader set of UI components and features for building complete admin interfaces.

25,387

🤖 Headless UI for building powerful tables & datagrids for TS/JS - React-Table, Vue-Table, Solid-Table, Svelte-Table

Pros of TanStack Table

  • More flexible and customizable, allowing for complex table configurations
  • Better performance for large datasets due to virtualization support
  • Extensive documentation and community support

Cons of TanStack Table

  • Steeper learning curve due to its advanced features
  • Requires more setup and configuration for basic use cases
  • Larger bundle size compared to simpler table libraries

Code Comparison

Drip Table:

<DripTable
  schema={schema}
  dataSource={dataSource}
  columns={columns}
/>

TanStack Table:

const table = useReactTable({
  data,
  columns,
  getCoreRowModel: getCoreRowModel(),
})

return <TableComponent table={table} />

Summary

TanStack Table offers more advanced features and flexibility, making it suitable for complex table requirements and large datasets. However, it comes with a steeper learning curve and requires more setup. Drip Table provides a simpler API for basic table needs, making it easier to implement quickly but potentially limiting for more advanced use cases.

13,037

The best JavaScript Data Table for building Enterprise Applications. Supports React / Angular / Vue / Plain JavaScript.

Pros of ag-grid

  • More feature-rich with advanced functionalities like pivoting, grouping, and aggregation
  • Extensive documentation and community support
  • Better performance for handling large datasets

Cons of ag-grid

  • Steeper learning curve due to its complexity
  • Commercial license required for enterprise features
  • Larger bundle size, which may impact initial load times

Code Comparison

ag-grid:

import { AgGridReact } from 'ag-grid-react';

<AgGridReact
  columnDefs={columnDefs}
  rowData={rowData}
  defaultColDef={defaultColDef}
  onGridReady={onGridReady}
/>

drip-table:

import { DripTable } from 'drip-table';

<DripTable
  schema={schema}
  dataSource={dataSource}
  components={components}
/>

Key Differences

  • ag-grid offers more out-of-the-box features and customization options
  • drip-table focuses on simplicity and ease of use
  • ag-grid has a more mature ecosystem and wider adoption
  • drip-table provides a more lightweight solution for basic table needs

Use Cases

  • Choose ag-grid for complex data grids with advanced requirements
  • Opt for drip-table when a simpler, more lightweight table solution is needed

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Drip Table

English | 简体中文 | Documentation | Discussions|Gitter | Official Wechat group

GitHub license npm version node yarn document PRs Welcome All Contributors

📖 Introduction

Drip Tableis a dynamic table solution for enterprise level middle and background launched by JD retail. The project is based on React and JSON Schema . It aims to reduce the difficulty of developing table and improve work efficiency by simple configuration to quickly generate page dynamic table.

Drip Table contains serval sub projects: drip-table, drip-table-generator.

The introduction of each sub-project are as follows:

  • drip-table: the core library of the solution for building dynamic tables. It's main ability is to render a dynamic table automatically when received data which conforms to the JSON Schema standard.

  • drip-table-generator: a visual tool for producing configuration data that meets the JSON Schema standard in order to sent to DripTable for rendering a table and columns.

Features

  • Basic table
  • Compound table
  • Toolbar
  • Renderer
  • Text component
  • Number component
  • Image component
  • Link component
  • Tag component
  • Button component
  • Select component
  • DataPicker component
  • PopUpPage component
  • RichText component
  • Group component
  • Custom component
  • Header slot
  • Footer slot
  • Pagination
  • Virtual list
  • Sticky
  • Sub table
  • Row selection
  • Row draggable
  • Fixed column
  • Show/Hide column
  • Edit data
  • Stripe
  • Table with border
  • Column resizing
  • Size
  • Global styles
  • Empty table prompt
  • Loading
  • Card layout
  • Filter

⬆️ Getting Start

Drip table is divided into two application scenarios: configuration end and application end. The configuration side is mainly responsible for generating JSON Schema standard data through visualization and low-code. The function of the application side is to render the JSON Schema standard configuration data into a dynamic table.

The configuration side

  1. Install dependencies

    The configuration side depend on the application side, please make sure that drip-table has been installed before installing dependencies.

    yarn

    yarn add drip-table-generator
    

    npm

    npm install --save drip-table-generator
    
  2. Import at the entrance of a file

    import DripTableGenerator from "drip-table-generator";
    import "drip-table-generator/dist/index.min.css";
    
  3. Use components in pages

    return <DripTableGenerator />;
    

    Then the configuration side can be rendered normally, as the sample screenshot below:

    drip-table-generator

The application side

  1. Install dependencies

    Install the drip-table:

    yarn

    yarn add drip-table
    

    npm

    npm install --save drip-table
    
  2. Import at the entrance of a file

    // import drip-table
    import DripTable from "drip-table";
    // import drip-table css
    import "drip-table/dist/index.min.css";
    
  3. Use components in pages

    const schema = {
      size: "middle",
      columns: [
        {
          key: "columnKey",
          title: "Column Title",
          dataIndex: "dataIndexName",
          component: "text",
          options: {
            mode: "single",
          },
        },
      ],
    };
    return (
      <DripTable
        schema={schema}
        dataSource={[]}
      />
    );
    

    Then the application side can be rendered normally, as the sample screenshot below:

    drip-table-demo

🤝 Contribution

If you're interested in this project, you're welcome to create ✨issue. We are appreciated for your ❤️star.

development

  1. Clone

    git clone https://github.com/JDFED/drip-table.git
    
  2. Install dependencies

    lerna bootstrap
    
  3. build independecies

    yarn

    yarn run build
    

    npm

    npm run build
    
  4. Run project

    yarn start
    
  • visit http://localhost:8000
  • drip-table demo page: /drip-table/guide/basic-demo
  • drip-table-generator demo page: /drip-table-generator/demo

For more commands, see DEVELOP . Please visit the official website address drip-table 。

Communication

Official Wechat group

License

MIT License

NPM DownloadsLast 30 Days