npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@microsoft/fabric-datagrid-web-components

v1.2.0

Published

DataGrid web component for Fabric Apps - Analytics

Readme

@microsoft/fabric-datagrid-web-components

Framework-agnostic Web Component for the Fabric Apps - Analytics DataGrid. This package wraps the React DataGrid component as a standard custom element (<fabric-data-grid>), bundling React internally so consumers do not need a React dependency.

For the Vega-Lite visualization web component, see @microsoft/fabric-visuals-web-components.

Trademarks

This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

Installation

npm install @microsoft/fabric-datagrid-web-components

Sibling dependency

  • @microsoft/fabric-visuals-core — provides DataTable, VisualTheme, and design tokens consumed by properties of this component.

Note: React and ReactDOM are bundled internally — you do not need to install them.

Architecture

@microsoft/fabric-visuals-core            (framework-agnostic types & tokens)
        ↓
@microsoft/fabric-datagrid                (React DataGrid component)
        ↓
@microsoft/fabric-datagrid-web-components (this package — wraps React as a custom element)
        ↓
@microsoft/fabric-datagrid-angular        (optional Angular wrapper)

Quick Start

<script type="module">
  import { registerFabricDataGrid } from '@microsoft/fabric-datagrid-web-components';

  registerFabricDataGrid();

  const el = document.querySelector('fabric-data-grid');
  el.columns = [
    { id: 'name', header: 'Name' },
    { id: 'age', header: 'Age', sortable: true },
  ];
  el.data = [
    { name: 'Alice', age: 30 },
    { name: 'Bob', age: 25 },
  ];
</script>

<fabric-data-grid style="height: 400px"></fabric-data-grid>

Public API

registerFabricDataGrid(tagName?)

Registers the custom element with the browser. Must be called before using <fabric-data-grid> in the DOM.

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | tagName | string | 'fabric-data-grid' | Custom element tag name. Override to avoid conflicts. |

Returns: true if registration occurred, false if the tag was already registered to this class.

Throws: If the tag is already registered to a different constructor.

FabricDataGridElement

The custom element class (extends HTMLElement). All properties are set as JavaScript object properties.

Properties

| Property | Type | Required | Description | |----------|------|----------|-------------| | columns | GridColumnDef[] | no | Column definitions. Auto-derived from DataTable data when omitted. | | data | DataTable \| Row[] \| string | no | Data source: a DataTable, Row[] array, or URL string to fetch JSON. | | defaultSort | SortConfig[] | no | Initial sort configuration. Applied only on first mount. | | rowHeight | number | no | Row height in pixels. Defaults to 40. | | theme | VisualTheme | no | Semantic color theme from @microsoft/fabric-visuals-core. | | pageSize | number | no | Rows per page. When set, pagination controls are shown. |

Events

| Event | Detail type | Description | |-------|-------------|-------------| | columnschange | GridColumnDef[] | Fired when columns are resized or reordered. | | rowtoggle | string | Fired when a tree row is expanded/collapsed. Detail is the row ID. | | filterchange | FilterChangeDetail | Fired when a column filter selection changes. |

Re-exported DataGrid Types

  • DataGridProps, GridColumnDef, Row, CellValue, SortConfig, SortDirection, CellRange, FilterChangeDetail

Using with Angular

For Angular applications, use the @microsoft/fabric-datagrid-angular package which provides a thin Angular wrapper (<fabric-data-grid-ng>) with @Input/@Output bindings. See its README for details.