03 / Case Study

BlockUI

An open-source React component library. Production-ready, accessible, and themeable components installable from npm in seconds.

View Storybook ↗npm Package ↗
Open Source2023

Type

Component Library

Stack

React · TypeScript · Storybook

Distribution

npm · @saheedibikunle/blockui

Status

Open Source

BlockUI

Button

Input

Modal

Card

Badge

Alert

Tooltip

Select

Button

Primary
Secondary
Danger
Ghost

Props

variant: "primary" | "secondary" | "danger" | "ghost"

size: "sm" | "md" | "lg"

disabled: boolean

The Problem

Teams waste hours rebuilding the same UI components on every project.

Every frontend project starts the same way: build a button. Build an input. Build a modal, a card, a badge, a dropdown. These are solved problems, but every team solves them again in slightly different ways, producing inconsistent UIs and wasted hours.

Existing open-source libraries like shadcn/ui and MUI are excellent but opinionated. They either require specific styling systems, impose their own design language, or make it hard to extract just the components you need without pulling in the entire library.

BlockUI was built to offer something simpler: a small, well-tested set of components that you install once, use everywhere, and style to match your own design system without fighting the library.

The Approach

npm install. Import. Done.

Components are built with TypeScript for type safety and developer experience, styled with plain CSS variables for maximum theming flexibility, and bundled with Rollup for clean tree-shakeable output. Every component is documented in Storybook with live examples, prop tables, and usage guidelines.

Terminal

$ npm install @saheedibikunle/blockui


Usage

import { Button, Input, Modal } from '@saheedibikunle/blockui';

export default function App() {
  return (
    <Button variant="primary" size="md">
      Get Started
    </Button>
  );
}

Screens

Interactive docs for every component.

Component Catalogue

blockui-storybook.vercel.app

COMPONENTS

Button

Input

Modal

Card

Badge

Alert

Input

Default input...

Focused input

Error state

Component Props

blockui-storybook.vercel.app

Badge

DefaultSuccessWarningError

variant: "default" | "success" | "warning" | "error"

size: "sm" | "md"

rounded: boolean

npm Package

blockui-storybook.vercel.app

B

@saheedibikunle/blockui

v1.2.0

Weekly downloads1.2k
Unpacked size48.3 kB
LicenseMIT
TypeScriptYes

Key Features

What ships with BlockUI.

TypeScript First

Every component ships with full TypeScript types. Prop tables are auto-generated from type definitions, keeping docs always in sync.

Storybook Documentation

Interactive Storybook with live component rendering, prop controls, accessibility checks, and copy-paste code examples.

Accessible by Default

Components follow WAI-ARIA patterns. Focus management, keyboard navigation, and screen reader announcements are built in, not bolted on.

Themeable

Styling is driven by CSS custom properties. Override any token at the root level and every component responds, with no class name conflicts.

Tree Shakeable

Bundled with Rollup for clean ESM output. Import only the components you use and the rest never enters your bundle.

npm Distribution

Published to npm under @saheedibikunle/blockui. Install with npm, yarn, or pnpm. No peer dependency conflicts on modern React projects.

Conclusion

Tooling built for the developer next to you.

BlockUI started as an internal toolkit I built at Lumina Learning. The frontend team kept duplicating component work across projects, and each version was slightly inconsistent. I extracted the common patterns into a shared library and over time it became a proper open-source package.

Building it taught me a lot about the non-obvious challenges of library authorship: how to write components that are flexible enough to be useful in any context without becoming a framework themselves, how to bundle for both CommonJS and ESM without breaking anything, and how to write documentation that makes adoption obvious rather than frustrating.

The experience also gave me genuine appreciation for the work behind libraries like Radix UI and Headless UI. Good component libraries are hard to do well. The API design matters as much as the implementation.

View Storybook ↗npm Package ↗← Back to Portfolio