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

@juspay/rescript-blend

v0.0.38

Published

ReScript bindings for @juspay/blend-design-system

Readme

ReScript Blend Design System

Fully typed, production-ready ReScript bindings for @juspay/blend-design-system.

This package bridges the Blend Design System (authored in React/TS) and your ReScript codebase by exposing strict, type-safe interfaces for the components. The bindings are generated deterministically from Blend's shipped TypeScript declarations by @juspay/rescript-bindgen — no hand-editing, no AI, no guesswork.

📦 Installation

npm install @juspay/rescript-blend

@juspay/blend-design-system ships as a bundled runtime dependency — you don't install or manage it directly; the matching version comes in automatically (see 1:1 versioning below). You only need to provide the ReScript toolchain to compile the bindings — the ReScript compiler (rescript >= 12.0.0), @rescript/react, and rescript-webapi — plus react / react-dom at runtime. These stay peer dependencies so your app controls the single copy.

1:1 Versioning @juspay/rescript-blend@X ships the bindings for @juspay/blend-design-system@X — the version numbers match exactly. To find the right Blend version for a release, just read this package's version. A binding-only re-release for an unchanged Blend version (e.g. a generator upgrade) uses a -N suffix: 0.0.36 → 0.0.36-1.

Note: This package ships ReScript source files (.res/.resi) only. The matching .js is emitted by your own ReScript build.

⚙️ Configuration

In your project's rescript.json, add @juspay/rescript-blend to dependencies:

{
  "dependencies": [
    "@rescript/react",
    "rescript-webapi",
    "@juspay/rescript-blend"
  ]
}

rescript-webapi is required because some component props are typed with Webapi.* (e.g. File / FileList).

🚀 Usage

All modules are namespaced under RescriptBlend. Access them with qualified names or open the module. Components come in two shapes depending on their upstream signature:

  • Record props (components that extend HTML attributes, e.g. Button) — props are a record type spread from HtmlAttrs.
  • Labeled args (e.g. Accordion, Alert) — props are labeled arguments.

Both are written the same way in JSX:

@react.component
let make = () => {
  open RescriptBlend

  <Accordion isMultiple=true defaultValue={CommonTypes.Str("panel-1")}>
    <Button text="Continue" buttonType=ButtonSharedTypes.Primary disabled=false />
  </Accordion>
}

Shared enums and union types live in dedicated modules (ButtonSharedTypes, AccordionTypes, CommonTypes, …) and are referenced qualified, e.g. ButtonSharedTypes.Primary or CommonTypes.Str("panel-1").

Sub-components

Sub-components are exposed as their own top-level modules (the generator flattens the export surface), e.g. AccordionItem:

open RescriptBlend

<Accordion>
  <AccordionItem value="1" title="Title"> {React.string("Content")} </AccordionItem>
</Accordion>

The exact prop surface for every component is the source of truth — read the component's .res file under src/. src/_REPORT.md lists every component, its readiness, and any props that were loosely typed or flagged.

🔧 Generation (maintainers)

Bindings are generated deterministically — the same Blend version always produces byte-identical output, with no secrets or network LLM calls.

# Bind the Blend version pinned in package.json
npm run generate

# Bind a specific version (and set package.json version to match, 1:1)
npm run generate -- --blend 0.0.36 --set-version

# Debug a single component
npm run generate -- --only Button

This wraps the @juspay/rescript-bindgen CLI, writes src/_REPORT.md (per-component readiness) alongside the bindings, formats the output, and fails if any component is flagged broken.

New Blend releases are picked up automatically: a daily scheduled job (.github/workflows/sync-bindings.yml) polls npm for a newer stable Blend version, regenerates, and opens a PR with the matching version bump for review. Merging to main publishes that version (.github/workflows/release.yml).