React Widget Dashboard Framework

1.9.6 · active · verified Sun Apr 19

The `di-widgets-framework` is a React-based library for creating interactive, customizable widget dashboards with integrated drag-and-drop functionality. Currently at version 1.9.6, it offers components like `WidgetPalette` for widget selection and `WidgetSettingsPanel` for extensive configuration, including styling, behavior, and type-specific options. This framework differentiates itself through dynamic loading of widget types from a backend API, built-in search for widgets, and a comprehensive settings panel supporting various widget categories (e.g., search, filter, results, analytics, header, footer, text, agent). While no explicit release cadence is stated, the versioning indicates active maintenance and development. It ships with TypeScript types for enhanced developer experience.

Common errors

Warnings

Install

Imports

Quickstart

This example demonstrates how to integrate `WidgetPalette` into a React application, showing a basic setup for a widget dashboard environment and highlighting the `widgetBackendUrl` prop.

import React from 'react';
import { WidgetPalette, WidgetDashboard } from 'di-widgets-framework';

function App() {
  // In a real application, you might fetch available widgets dynamically
  const availableWidgetTypes = [
    { id: 'search', name: 'Search Input', description: 'Search input widget' },
    { id: 'filter', name: 'Data Filter', description: 'Filter/facet widget' },
    { id: 'results', name: 'Results Display', description: 'Results display widget' },
    { id: 'analytics', name: 'Analytics Chart', description: 'Analytics/charts widget' },
  ];

  return (
    <div style={{ display: 'flex', height: '100vh', padding: '20px' }}>
      <div style={{ width: '25%', paddingRight: '20px', borderRight: '1px solid #eee' }}>
        <h3>Widget Palette</h3>
        <WidgetPalette 
          widgetBackendUrl="http://localhost:3001" 
          // In a real app, you might pass availableWidgetTypes as a prop if not fetched by backend
        />
      </div>
      <div style={{ flex: 1, paddingLeft: '20px' }}>
        <h3>Dashboard Area</h3>
        {/* WidgetDashboard component would be used here to render dropped widgets */}
        {/* Example: <WidgetDashboard backendUrl="http://localhost:3001" /> */}
        <p>Drag widgets from the palette onto this area.</p>
      </div>
    </div>
  );
}

export default App;

view raw JSON →