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

@liqueur/react

v0.1.0

Published

Liquid UI - React component library for rendering LiquidView schemas with dashboard management

Readme

@liqueur/react

React components for rendering Liquid Protocol schemas

Overview

@liqueur/react provides React components that render UI from Liquid Protocol schemas. This enables dynamic, data-driven dashboards generated by AI or defined programmatically.

Features

  • LiquidRenderer - Main component for rendering schemas
  • Chart components - Bar, line, pie, area charts (Recharts)
  • Table components - Interactive tables (@tanstack/react-table)
  • Layout system - Grid and Stack layouts
  • Loading states - Built-in loading indicators
  • Type-safe - Full TypeScript support

Installation

npm install @liqueur/react @liqueur/protocol

Peer Dependencies

npm install react react-dom

Usage

Basic Example

import { LiquidRenderer } from '@liqueur/react';
import type { LiquidViewSchema } from '@liqueur/protocol';

const schema: LiquidViewSchema = {
  version: '1.0',
  layout: { type: 'grid', columns: 2 },
  components: [
    {
      type: 'chart',
      chart_type: 'bar',
      title: 'Monthly Sales',
      data_source: 'sales'
    },
    {
      type: 'table',
      columns: ['month', 'amount'],
      title: 'Sales Data',
      data_source: 'sales'
    }
  ],
  data_sources: {
    sales: { resource: 'sales' }
  }
};

const data = {
  sales: [
    { month: 'Jan', amount: 1000 },
    { month: 'Feb', amount: 1500 },
    { month: 'Mar', amount: 1200 }
  ]
};

function Dashboard() {
  return <LiquidRenderer schema={schema} data={data} />;
}

With Loading State

function Dashboard({ schema, data, loading }) {
  return (
    <LiquidRenderer
      schema={schema}
      data={data}
      loading={loading}
    />
  );
}

Components

LiquidRenderer

Main component for rendering complete schemas.

<LiquidRenderer
  schema={schema}           // LiquidViewSchema
  data={data}               // Record<string, unknown[]>
  loading={false}           // boolean
  className="my-dashboard"  // string
/>

Props: | Prop | Type | Description | |------|------|-------------| | schema | LiquidViewSchema | The schema to render | | data | Record<string, unknown[]> | Data by data_source name | | loading | boolean | Show loading indicators | | className | string | CSS class name |

ChartComponent

Renders charts (bar, line, pie, area).

<ChartComponent
  chart_type="bar"
  title="Monthly Sales"
  data={salesData}
  xKey="month"
  yKeys={['amount']}
  height={300}
/>

Props: | Prop | Type | Default | Description | |------|------|---------|-------------| | chart_type | 'bar' \| 'line' \| 'pie' \| 'area' | - | Chart type | | title | string | - | Chart title | | data | unknown[] | - | Chart data | | xKey | string | First key | X-axis field | | yKeys | string[] | Numeric keys | Y-axis fields | | width | number \| string | '100%' | Chart width | | height | number | 300 | Chart height | | loading | boolean | false | Loading state |

TableComponent

Renders interactive data tables.

<TableComponent
  columns={['name', 'amount', 'date']}
  title="Transactions"
  data={transactions}
/>

Props: | Prop | Type | Description | |------|------|-------------| | columns | string[] | Column names to display | | title | string | Table title | | data | unknown[] | Table data | | loading | boolean | Loading state |

Layouts

GridLayout

CSS Grid-based responsive layout.

<GridLayout columns={2} gap={16}>
  <ChartComponent {...} />
  <TableComponent {...} />
</GridLayout>

StackLayout

Vertical stacking layout.

<StackLayout gap={16}>
  <ChartComponent {...} />
  <TableComponent {...} />
</StackLayout>

Hooks

useLiquidView

Fetches data for a Liquid schema.

import { useLiquidView } from '@liqueur/react';

function Dashboard({ schema }) {
  const { data, loading, error } = useLiquidView({ schema });

  if (error) return <div>Error: {error.message}</div>;

  return <LiquidRenderer schema={schema} data={data} loading={loading} />;
}

useDashboards

Fetches and manages dashboard list.

const { dashboards, isLoading, error, refresh } = useDashboards({
  search: 'expenses',
  sort: 'created',
  order: 'desc',
});

useDashboardMutations

CRUD operations for dashboards.

const { createDashboard, updateDashboard, deleteDashboard } =
  useDashboardMutations();

await createDashboard({ title: 'New Dashboard', schema });
await updateDashboard('id', { title: 'Updated' });
await deleteDashboard('id');

useFavorites

Manages favorite dashboards (localStorage).

const { favorites, toggleFavorite, isFavorite } = useFavorites();

toggleFavorite('dashboard-id');
if (isFavorite('dashboard-id')) {
  // ...
}

Dashboard Manager Components

Pre-built components for dashboard management UI:

import {
  DashboardList,
  DashboardSearch,
  DashboardCard,
  useDashboards,
  useFavorites,
} from '@liqueur/react';

function DashboardManager() {
  const [search, setSearch] = useState('');
  const { dashboards, isLoading } = useDashboards({ search });
  const { toggleFavorite } = useFavorites();

  return (
    <>
      <DashboardSearch onSearch={setSearch} />
      <DashboardList
        dashboards={dashboards}
        isLoading={isLoading}
        onFavoriteToggle={toggleFavorite}
      />
    </>
  );
}

Development

# Build
npm run build

# Test
npm test

# Test with coverage
npm run test:coverage

# Type check
npm run typecheck

License

MIT