Docs · Widget
Widget builder.
A drop-in security component you can paste into any website. Configure it below, copy the snippet, and your users get an approval scanner without leaving your page.
Live. The extension is approved on the Chrome Web Store and Firefox Add-ons. Configure the widget below and paste the snippet into any page.
Configure and preview.
Live preview
Real-timeAllowanceGuard
No allowances found
Configuration
CustomiseDisplay options
Demo wallet — Vitalik’s public address.
Generated code.
React component.
<AllowanceGuardWidget
walletAddress="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
chainId={1}
showRiskOnly={false}
maxItems={5}
theme="light"
compact={false}
onAllowanceClick={(allowance) => {
console.log('Allowance clicked:', allowance)
}}
/>Plain HTML.
<!DOCTYPE html>
<html>
<head>
<title>My DeFi App</title>
<script src="https://unpkg.com/allowance-guard-widget@latest/dist/widget.js"></script>
</head>
<body>
<div id="allowance-guard-widget"></div>
<script>
AllowanceGuardWidget.init({
container: '#allowance-guard-widget',
walletAddress: '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045',
chainId: 1,
showRiskOnly: false,
maxItems: 5,
theme: 'light',
compact: false,
onAllowanceClick: (allowance) => {
console.log('Allowance clicked:', allowance)
}
})
</script>
</body>
</html>Installation.
The configuration above runs against the live API today. The install snippets below are previews of the published flow — they become copy-paste-ready the moment the extension lands in each store.
What you can do right now
- Use the REST API v1 to scan wallets. See the API reference.
- Clone the Node.js SDK from
packages/client. - Watch the GitHub repository to be notified when the extension publishes.
React (preview)
Pending1. Install (when published)
npm install allowance-guard-widget
2. Use
<AllowanceGuardWidget
walletAddress="0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
chainId={1}
showRiskOnly={false}
maxItems={5}
theme="light"
compact={false}
onAllowanceClick={(allowance) => {
console.log('Allowance clicked:', allowance)
}}
/>HTML (preview)
Pending1. Include the script
<script src="https://cdn.allowanceguard.com/widget.js"></script>
2. Mount and initialise
<div id="allowance-guard"></div>
AllowanceGuard.init({...})Widget properties.
Seven props. Only walletAddress is required; defaults work for the rest.
| Property | Type | Default | Description |
|---|---|---|---|
| walletAddress | string | — | The wallet address to display allowances for |
| chainId | number | 1 | The chain ID to filter by |
| showRiskOnly | boolean | false | Show only high-risk allowances |
| maxItems | number | 10 | Maximum number of allowances to display |
| theme | string | 'light' | Widget theme: 'light', 'dark', or 'auto' |
| compact | boolean | false | Use compact display mode |
| onAllowanceClick | function | — | Callback fired when an allowance is clicked |
