A web component button to trigger a WebLN payment request. The easiest and fastest way for your website visitors to send you sats.
Lightning invoices can either be automatically generated through a LNURL-pay Lightning Address or the payment can be sent as a keysend payment.
Include the script and drop the <simple-boost>
tag anywhere on your page:
<script type="module" src="https://esm.sh/simple-boost@latest"></script>
<simple-boost
address="hello@getalby.com"
amount="2100"
currency="sats">
Support our work
</simple-boost>
The React wrapper depends on the following packages to work:
react
,react-dom
, and@lit/react
Installing these ensures the component works correctly in your React project.
npm install react react-dom @lit/react
The React wrapper will not work in a non-React project.
import { SimpleBoostButton } from "simple-boost/react";
function Boost() {
return (
<SimpleBoostButton
address="hello@getalby.com"
amount={2100}
currency="sats"
>
Support our work
</SimpleBoostButton>
);
}
export default Boost;
Install dependencies:
npm i
Compile the TypeScript sources:
npm run build
Watch for changes:
npm run build:watch
Run local dev server with Vite:
npm run serve
Open: http://localhost:8000/dev/index.html
For production mode:
npm run serve:prod
Generate docs:
npm run docs
Serve docs locally:
npm run docs:serve
Docs will usually be served at: http://localhost:8000
Built with ⚡ by the Alby team and contributors.