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

@mackral/bible-verses

v1.0.0

Published

React Bible verse browsing UI library

Readme

@mackral/bible-verses

A simple, experimental React 18 Bible verse browsing UI library, built with modern React patterns (hooks, reducer, and context).

Designed for React beginners, advanced developers, and church dev teams who want an easy way to browse Bible translations, books, chapters, and verses inside a React application.


✨ Features

  • 📖 Browse Bible translations
  • 📚 Select books
  • 🔢 Navigate chapters
  • 📜 Read verses
  • ⚛️ Built with React 18, hooks, useReducer, and context
  • 📦 ESM-only, tree-shakeable package
  • 🧩 Modular UI components

⚠️ Status: Experimental
This package is actively evolving and moving toward a stable release.


📦 Installation

npm install @mackral/bible-verses

🧠 Design Philosophy

  • Simple and predictable state management
    • Clear separation of concerns:
    • API client
    • Reducer
    • Controller logic
    • UI components
  • Friendly for beginners
  • Flexible enough for advanced use cases This library does not handle routing. Routing-based navigation may be supported in future releases.

🎨 Styling

The current version uses utility-style class names (commonly used with Tailwind CSS).

  • Styling is not enforced
  • You can override styles freely
  • A non–Tailwind-dependent version is planned for later releases

🔌 Bible API

This library consumes data from a Bible API.

  • API access is abstracted behind an internal client
  • You only need to provide a baseUrl
  • The API is treated generically and can be replaced if compatible

🚀 Complete Working Example

This example shows a fully working setup using all exported components.

import {
  BibleProvider,
  TranslationSelector,
  BookList,
  Chapters,
  Verses
} from "@mackral/bible-verses";

function BibleApp() {
  return (
    <BibleProvider
      apiConfig={{ baseUrl: "https://your-bible-api.com" }}
      onSelectionChange={(selection) => {
        console.log("Selection changed:", selection);
      }}
    >
      <div style={{ padding: "1rem" }}>
        <h1>Bible Reader</h1>

        <TranslationSelector />

        <hr />

        <BookList />

        <hr />

        <Chapters />

        <hr />

        <Verses />
      </div>
    </BibleProvider>
  );
}

export default BibleApp;

You can drop this component directly into a React 18 app (Vite, CRA, Next.js client-side).

🧩 Components

<BibleProvider />

Wraps your app and provides shared Bible state.

<BibleProvider
  apiConfig={{ baseUrl }}
  onSelectionChange={(selection) => console.log(selection)}
>
  {children}
</BibleProvider>

Props | Prop | Description | | apiConfig | { baseUrl } for the Bible API | | onSelectionChange | Callback fired when translation, book, or chapter changes |

<TranslationSelector />

Dropdown for selecting a Bible translation.

<BookList />

Displays available books for the selected translation.

<Chapters />

Shows chapter numbers for the selected book.

<Verses />

Renders verse content for the selected chapter.

🧪 Experimental Notes

Current limitations:

  • No routing support
  • No controlled visibility props
  • Assumes a consistent API response shape

Planned for future releases:

  • Routing-aware navigation
  • Controlled visibility / headless usage
  • Styling-agnostic components
  • Improved extensibility

🧱 Namespace Strategy

@mackral/bible-verses is part of the @mackral namespace.

More packages under this namespace are planned, making related tools easy to discover.

🤝 Contributing

Contributions are welcome — simple PRs especially 🙌

How to contribute

  1. Fork the repository
  2. Create a feature or fix branch
  3. Keep changes focused and minimal
  4. Open a PR with a clear description

Good first contributions:

  • Bug fixes
  • Documentation improvements
  • Small UI tweaks
  • Minor code cleanup (no major refactors without discussion)

License

MIT