This is a React component for IndieBoosting.com to help you list other indie products on your site and earn money from them.
- Check out: https://indieboosting.com/customize-a-widget
npm i @indieboosting/react
<link rel="stylesheet" href="https://cdn.indieboosting.com/latest/style.css">
<script src="https://cdn.indieboosting.com/latest/script.js?id=XXXXXX"></script>
-
Create a new boosting channel on IndieBoosting.com and get your
id
(tracking ID). -
[Optional] Import the CSS in your Next.js
_app.js
or_app.tsx
file:
<link rel="stylesheet" href="https://cdn.indieboosting.com/latest/style.css" />
- Use the component in your app:
import { IndieBoosting } from "@indieboosting/react";
const YourComponent = () => {
return <IndieBoosting id="your-tracking-id" />;
};
export default YourComponent;
Required props:
-
id
: The tracking ID of your boosting channel.
Optional props:
-
className
: Custom CSS class for the container. -
noBorder
: Iftrue
, removes the border around the component. -
noShadow
: Iftrue
, removes the shadow effect. -
noTitle
: Iftrue
, hides the title. -
noCredits
: Iftrue
, hides the credits. -
noPadding
: Iftrue
, removes the padding. -
openSelf
: Iftrue
, opens links in the same tab. -
theme
: Color theme, eitherlight
ordark
(default:auto
). -
title
: Custom title for the component (default:"Top products"
). -
maxProducts
: Maximum number of products to display (default:3
, max:10
). -
maxColumns
: Maximum number of columns to display (default:3
). -
direction
: Layout direction, eitherhorizontal
(default) orvertical
. -
permanent
: Iftrue
, the products will be displayed permanently (life-time). Ideally used for a single page, blog details, etc. -
permanentUrl
: The permanent URL of the current page,required
ifpermanent
istrue
. -
owned
: Iftrue
, the products will be displayed as owned by the current channel's user. -
debug
: Iftrue
, enables debug mode with additional console logging.
<IndieBoosting id="TRACKINGID" maxProducts={5} direction="vertical" permanent />
You can install it with npm (don't expect much fanciness):
npm i
# or
bun i
npm run dev
# or
bun run dev
npm run build
# or
bun run build
- Push to
main
to trigger a release.