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="[email protected]" amount="2100" currency="sats">
Support our work
</simple-boost>Install the package:
npm install simple-boostreactreact-dom@lit/react
Install them with:
npm install react react-dom @lit/reactThe React wrapper will not work in non-React projects.
import {SimpleBoostButton} from 'simple-boost/react';
function Boost() {
return (
<SimpleBoostButton
address="[email protected]"
amount={2100}
currency="sats"
>
Support our work
</SimpleBoostButton>
);
}
export default Boost;Since this component relies on client-side rendering, remember to add "use client" at the top of your file:
'use client';
import {SimpleBoostButton} from 'simple-boost/react';
export default function Boost() {
return (
<SimpleBoostButton
address="[email protected]"
amount={2100}
currency="sats"
>
Support our work
</SimpleBoostButton>
);
}Install dependencies:
npm iCompile the TypeScript sources:
npm run buildWatch for changes:
npm run build:watchRun local dev server with Vite:
npm run serveOpen: http://localhost:8000/dev/index.html
For production mode:
npm run serve:prodGenerate docs:
npm run docsServe docs locally:
npm run docs:serveDocs will usually be served at: http://localhost:8000
Built with ⚡ by the Alby team and contributors.