Example: Simple Quote widget (minimal addon)
manifest.json
{
"schema": 1,
"id": "com.example.addon.simple-quote",
"name": "Simple Quote",
"version": "1.0.0",
"author": "Example Dev",
"license": "MIT",
"description": "Rotates built-in quotes. No network.",
"permissions": [],
"widget": {
"entry": "dist/widget.js",
"defaultRegion": "bottom-left",
"minWidth": 3,
"minHeight": 1
}
}src/Quote.tsx
import { useEffect, useState } from "react";
const QUOTES = [
"Measure twice, cut once.",
"Done is better than perfect.",
"Ship small, ship often.",
];
export default function Quote(props: { theme: "dark" | "light" }) {
const [i, setI] = useState(0);
useEffect(() => {
const t = setInterval(() => setI((n) => (n + 1) % QUOTES.length), 60_000);
return () => clearInterval(t);
}, []);
const dark = props.theme === "dark";
return (
<div
style={{
padding: 16,
borderRadius: 12,
background: dark ? "#020617" : "#fff",
color: dark ? "#e2e8f0" : "#0f172a",
fontStyle: "italic",
}}
>
{QUOTES[i]}
</div>
);
}💡 Tip: Zero-permission addons sail through marketplace review — great first submission.
Last updated on
Was this helpful?