Interactive · Gutenberg
Expense Tracker block for WordPress
Track and visualize expenses by category with charts, totals, and budget management.
Get Blockenberg
Free Gutenberg block in Blockenberg. The inspector controls and front-end behavior on this page come from this block’s source, not a shared stub.
What it actually does
Track and visualize expenses by category with charts, totals, and budget management.
Inspector panels on this block: Content, Settings. Those titles come from index.js, not from a shared template.
Behavior controls: “Currency Symbol” options: USD ($), EUR (€), GBP (£), JPY (¥), RUB (₽).
Where to find it
Gutenberg inserter → Interactive → search “Expense Tracker” (block name `blockenberg/expense-tracker` in block.json). Style it in the sidebar after insert.
How to use Expense Tracker block for WordPress
- Install Blockenberg. Install from WordPress.org and activate the plugin.
- Insert the block. Edit a page, click +, search for “Expense Tracker”, insert it. Category: Interactive.
- Configure inspector controls that exist on this block. Open Content. Set “Content — Title”, “Subtitle”, “Show Title”, “Show Subtitle”.
- Check the published page. The view script reads HTML data attributes: data-opts, data-uid. The block editor preview may not run the same view script.
Inspector controls from this block’s code
| Control | What the code does |
|---|---|
| Content — Title | Text field in the inspector. block.json default: Expense Tracker. Saved as `title`. |
| Subtitle | Text field in the inspector. block.json default: Track your spending by category. Saved as `subtitle`. |
| Show Title | On/off toggle in the inspector. On by default. Saved as `showTitle`. |
| Show Subtitle | On/off toggle in the inspector. On by default. Saved as `showSubtitle`. |
| Currency Symbol | Select control; the chosen value is saved on the block. Options: USD ($); EUR (€); GBP (£); JPY (¥); RUB (₽). block.json default: $. Saved as `currency`. |
| Show Budget | On/off toggle in the inspector. On by default. Saved as `showBudget`. |
| Default Monthly Budget | Numeric range control in the inspector. Range 100–100000. block.json default: 1000. Saved as `defaultBudget`. |
| Show Category Chart | On/off toggle in the inspector. On by default. Saved as `showChart`. |
| Max Width (px) | Numeric range control in the inspector. Range 400–1200. block.json default: 720. Saved as `contentMaxWidth`. |
| Typography — Title | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoTitle`. |
| Subtitle (Typo Subtitle) | Shared Blockenberg typography popover (family, size, weight, spacing). Saved as `typoSubtitle`. |
| Accent Color | Color control in the inspector. block.json default: #10b981. Saved as `accentColor`. |
| Danger / Over-Budget | Color control in the inspector. block.json default: #ef4444. Saved as `dangerColor`. |
| Section Background | Color control in the inspector. block.json default: #f0fdf4. Saved as `sectionBg`. |
| Card Background | Color control in the inspector. block.json default: #ffffff. Saved as `cardBg`. |
| Title Color | Color control in the inspector. block.json default: #064e3b. Saved as `titleColor`. |
| Label Color | Color control in the inspector. block.json default: #374151. Saved as `labelColor`. |
| Subtitle Color | Color control in the inspector. block.json default: #6b7280. Saved as `subtitleColor`. |
| Border Color | Color control in the inspector. block.json default: #d1fae5. Saved as `borderColor`. |
What the front-end script actually does
- The view script reads HTML data attributes: data-opts, data-uid.
- It writes to localStorage in the visitor’s browser, not to wp_options.
- Keyboard handlers move focus between items.
When this is the right block
- Track and visualize expenses by category with charts, totals, and budget management — that is the job of Expense Tracker, not a generic content block.
- Use it when you need the editor control labeled “Content — Title”, which exists on this block’s inspector.
- It matches pages about expense, budget, finance.
- Inserter grouping: quizzes, games, and click-to-reveal experiences.
Notes from the implementation
viewScript: this folder’s frontend.js is enqueued on the front end for this block.
FAQ
How do I add the Expense Tracker block in WordPress?
Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Expense Tracker”. It sits under Interactive. After insert, open Content and set “Content — Title”, “Subtitle”, “Show Title”, “Show Subtitle”.
Where does Expense Tracker store visitor state?
In localStorage on that browser. Clearing site data resets it. It is not a WordPress user meta field unless render.php says so.
Is the Expense Tracker Gutenberg block free?
Yes. Expense Tracker ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.
Can I style Expense Tracker to match my theme?
Yes. Blockenberg’s shared typography and color panels apply here, plus any block-specific style controls listed on this page (panels: Content, Settings).
Related interactive blocks
2048 Game
The classic sliding-tile 2048 puzzle. Swipe or use arrow keys to merge tiles and reach the 2048 tile.
Analog Clock
A beautiful live analog clock rendered with SVG. Fully customizable: clock style, timezone, colors, size, and optional date/time labels.
Bingo Card
Interactive 5×5 Bingo card with number calling, win detection, and celebration animations.
Content Score
Visual content or SEO scoring card with circular gauge, color-coded criteria rows, and overall grade.
Dice Roller
Interactive dice roller supporting d4, d6, d8, d10, d12, d20 and d100. Roll multiple dice, see individual results, totals, and past roll history.
Drawing Canvas
A fully interactive freehand drawing canvas with multiple tools, undo, and download — right in your page.
Get Blockenberg
Install Blockenberg from WordPress.org, then insert Expense Tracker from the Gutenberg inserter.