
Product
Introducing Webhook Events for Alert Changes
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.
@edrlab/thorium-web
Advanced tools
Thorium Web is a web-based reader for EPUB and other digital publications, built using Next.js and modern web technologies. It is designed to provide a fast, responsive, and accessible reading experience.
There are two ways to get started with Thorium Web:
You can take a look at the Implementers’ Guide for more details.
To get started with Thorium Web, follow these steps:
git clone https://github.com/edrlab/thorium-web.gitpnpm installpnpm devThe development server will automatically reload the page when you make changes to the code.
To use Thorium Web in your own project, install the package and its peer dependencies:
npm install @edrlab/thorium-web @readium/css @readium/navigator @readium/navigator-html-injectables @readium/shared react-redux @reduxjs/toolkit i18next i18next-browser-languagedetector i18next-http-backend motion react-aria react-aria-components react-stately react-modal-sheet react-resizable-panels
Then you can import and use the components in your own code:
import { StatefulReader } from "@edrlab/thorium-web/epub"
const MyApp = () => {
// ... fetch the manifest and get its self link href
return (
<StatefulReader
rawManifest={ manifestObject }
selfHref={ manifestSelfHref }
/>
)
}
You can use the StatefulReader component to use the same exact Reader component as the one in the Next.JS App, but with your own plugins, store and preferences. Or you can use its components to build your own custom reader.
[!IMPORTANT] At this point in time, when using components from
@edrlab/thorium-web/epub, you have to import the store/lib, hooks and Preferences Provider from the same path, otherwise your custom app will use another instance.
You can customize this project extensively through Preferences: breakpoints, which and how to display actions, themes provided to users, configuration of the docking system, sizes and offsets of icons, etc.
See Customization in docs for further details.
To build and deploy Thorium Web, run the following commands:
pnpm build
pnpm run deploy
This will create a production-ready build of the reader and deploy it to the specified hosting platform.
This repository is using the following configuration:
To deploy, the following script is run:
npx @cloudflare/next-on-pages && npx wrangler pages deploy
It’s running with defaults, which means a commit triggers a build and deploy for the current branch to preview. You can then access the app from a subdomain using this branch name.
More details in the @cloudflare/next-on-pages repo.
We welcome contributions to Thorium web! If you're interested in helping out, please fork this repository and submit a pull request with your changes.
Thorium Web is licensed under the BSD-3-Clause license.
Thorium Web is built using a number of open-source libraries and frameworks, including Readium, React, React Aria, and Material Symbols and Icons. We are grateful for the contributions of the developers and maintainers of these projects.
FAQs
Play with the capabilities of the Readium Web toolkit
We found that @edrlab/thorium-web demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Add real-time Socket webhook events to your workflows to automatically receive software supply chain alert changes in real time.

Security News
ENISA has become a CVE Program Root, giving the EU a central authority for coordinating vulnerability reporting, disclosure, and cross-border response.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.