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

arb-scroll-components

v0.2.0

Published

Scroll-styled certificate header components (web SVG + react-pdf) built for Bhutan competency assessment documents.

Readme

arb-scroll-components

React components for rendering a scroll-styled certificate header — one version for the browser (SVG) and one for PDF generation (@react-pdf/renderer).

Install

npm install arb-scroll-components

react is a required peer dependency. @react-pdf/renderer is only required if you use the /pdf entry point.

Web components

import { ScrollFrame, Field, MetaRow, CompetencyAssessmentHeader } from 'arb-scroll-components';

ScrollFrame

A generic scroll-shaped SVG frame. You supply the banner and body content.

<ScrollFrame
  maxWidth={900}
  banner={<h1>My Certificate</h1>}
>
  <p>Body content goes here</p>
</ScrollFrame>

ScrollFrame example

Props: strokeColor, fillColor, shadeColor, strokeWidth, maxWidth, banner, children, className.

Also exports two small helpers used alongside it: Field({ label }) (a labelled dotted line) and MetaRow({ left, leftValue, right, rightValue }) (two label/value pairs side by side).

CompetencyAssessmentHeader

A pre-composed header built on top of ScrollFrame, styled with Tailwind utility classes and a bundled Comfortaa display font.

<CompetencyAssessmentHeader
  bannerLabel="Competency Based Assessment"
  subtitle="འབྲུག་ཤེས་ཚད་དང་ལག་རིག་ཡོངས་འཛིན།"
  subtitleStyle={{ fontFamily: "DzongkhaFont" }}
  row1Value1="Electrician"
  row1Value2="3 hours"
  row2Value1={100}
  row2Value2={50}
/>

CompetencyAssessmentHeader example

bannerLabel and subtitle have no defaults — pass whatever heading applies to your use case. row1Value1/row1Value2 fill the "Occupation"/"Time" line, row2Value1/row2Value2 fill the "Total Marks"/"Pass mark" line.

Every text field accepts a matching ...Style prop for inline style overrides: bannerLabelStyle, subtitleStyle, row1Value1Style, row1Value2Style, row2Value1Style, row2Value2Style. subtitleStyle={{ fontFamily: "DzongkhaFont" }} is how you render just that line in a Dzongkha font — the consuming app still needs its own CSS @font-face for "DzongkhaFont" since this package does not bundle it (only Comfortaa is bundled).

Requires Tailwind CSS in the consuming app. This component only carries Tailwind class names — it does not ship any CSS. Your tailwind.config content globs must include this package so the utility classes actually get generated, e.g.:

content: [
  './src/**/*.{js,jsx}',
  './node_modules/arb-scroll-components/dist/**/*.js',
],

The Comfortaa font is bundled internally as a data URI, so no separate asset step is needed for it.

PDF component

import { ScrollHeader } from 'arb-scroll-components/pdf';

ScrollHeader renders the same scroll layout for @react-pdf/renderer documents.

<ScrollHeader
  width={535}
  bannerLabel="Competency Based Assessment"
  dzongkhaTitle="འབྲུག་ཤེས་ཚད་དང་ལག་རིག་ཡོངས་འཛིན།"
  occupation="Electrician"
  time="3 hours"
  totalMarks={100}
  passMark={50}
/>

ScrollHeader PDF example

You must register the fonts it references before rendering: cambria, cambriab, and DzongkhaFont. ScrollHeader does not register them itself — it only references the family names, so any app rendering it must call Font.register first, e.g.:

import { Font } from '@react-pdf/renderer';

Font.register({ family: 'cambria', src: '/fonts/cambria.ttf' });
Font.register({ family: 'cambriab', src: '/fonts/cambriab-bold.ttf' });
Font.register({ family: 'DzongkhaFont', src: '/fonts/your-dzongkha-font.ttf' });

These fonts are not bundled with this package. Cambria in particular is a proprietary Microsoft font and cannot be redistributed — supply your own licensed copy (or substitute an equivalent font under a compatible license).

License

MIT