A button builder. Style one in the browser, copy CSS or Tailwind, or save SVG and PNG.
Node 22.12 or newer.
npm install
npm run devOpen http://localhost:3000.
npm run typecheck
npm test
npm run buildNo accounts, no database, no env vars. Icons come from Iconify. If that request fails, the picker falls back to a small set.
The Next.js app is just the wrapper. The builder lives in components/button-builder/.
button-builder-types.tsis the config objectbutton-output.tsturns that config into CSS, Tailwind, HTML, React, SVG, PNG, and a promptbutton-color-utils.ts,button-presets.ts,button-fonts.ts, andbutton-icons.tsare the supporting piecesbutton-builder.tsxis the UI
You can copy those files into another project and keep the UI, or skip the UI and just call the generators.
import { DEFAULT_CONFIG } from "./button-builder-types";
import { getCssCode, getTailwindClasses, createSvgMarkup } from "./button-output";
const config = {
...DEFAULT_CONFIG,
label: "Get started",
fill: "#171717",
textColor: "#ffffff",
};
getCssCode(config);
getTailwindClasses(config);
await createSvgMarkup(config);PRs are welcome. If you change how a button exports, add a test in tests/.
MIT. Use it however you want.
