@cardscan.ai/insurance-cardscan-react

中文文档
4.0.21发布于 2025/07/25SEE LICENSE IN LICENSE.mdTypeScriptESM + CJS近 30 天下载 2876

A library that makes it easy to add health insurance card scanning to any web application

原始使用文档
文档目录5 节
  1. Widget Features:
  2. Basic Example:
  3. Compatibility
  4. Peer Dependencies
  5. Documentation

CardScan.ai: React Widget

CardScan.ai is the fastest way to add health insurance card scanning to your mobile or web application.


drawing


CardScan.ai has UI widgets to support scanning on web, mobile web, Flutter, React Native, native iOS and Android. Or use the API to build your own implementation.

Widget Features:

  • Smart Card Detection
  • Auto & Manual Capture
  • Customizable User Prompts
  • Browser/Device Permission Helper
  • Retrying Failed & Low-Quality Scans
  • Responsive UI
  • Web to Mobile Handoff

drawing


Basic Example:

import React from "react";
import { render } from "react-dom";
import {CardScanView} from "@cardscan.ai/insurance-cardscan-react";

function onSuccess(card: any) {
  console.log("new card: ", card);
}

// See Authentication on where to get this token.
const token = 'JWT_TOKEN'

// Render CardScanView
render(
  <CardScanView
    live={false}
    sessionToken={token}
    onSuccess={onSuccess}
    />
  ,document.getElementById("root")
);

Compatibility

  • Node Versions: 14, 16, 18
  • React Versions: >=17.0.2, 18.2.0+
  • Webpack Versions: 4.x, 5.x
  • Babel Versions: 6.x, 7.x

Peer Dependencies

  • React: >=17.0.2
  • React-DOM: >=17.0.2

Documentation

Checkout the full docs and React Widget docs.

版本与发布记录

@cardscan.ai/insurance-cardscan-react 共发布 96 个版本,首次发布于 2021/09/17;过去 12 个月发布了 0 个版本。

版本发布日期距今
4.0.21latest2025/07/251.3 年前
4.0.202025/07/241.3 年前
4.0.192025/07/181.3 年前
4.0.182025/07/021.4 年前
4.0.172025/06/241.4 年前
4.0.162025/06/191.4 年前

关于 @cardscan.ai/insurance-cardscan-react 的常见问题

@cardscan.ai/insurance-cardscan-react 是什么?

A library that makes it easy to add health insurance card scanning to any web application

如何安装 @cardscan.ai/insurance-cardscan-react?

在项目目录运行 npm install @cardscan.ai/insurance-cardscan-react,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:react(>=17.0.2)、react-dom(>=17.0.2)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@cardscan.ai/insurance-cardscan-react 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@cardscan.ai/insurance-cardscan-react 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@cardscan.ai/insurance-cardscan-react 可以商用吗?

@cardscan.ai/insurance-cardscan-react 使用 SEE LICENSE IN LICENSE.md 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@cardscan.ai/insurance-cardscan-react 的下载量有多少?

根据 npm 官方下载统计,@cardscan.ai/insurance-cardscan-react 在 2026/10/09 – 2026/11/07 这 30 天内被下载 2,876 次,日均约 96 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@cardscan.ai/insurance-cardscan-react 还在维护吗?

最新版本 4.0.21 发布于 2025/07/25(1.3 年前);至今共发布 96 个版本,其中过去 12 个月发布了 0 个;首次发布于 2021/09/17。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。