Interactive · Gutenberg

Sudoku block for WordPress

Interactive Sudoku puzzle with difficulty levels, hints, mistake tracking, and timer. Full WYSIWYG preview in editor.

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.

Get Blockenberg

What it actually does

Interactive Sudoku puzzle with difficulty levels, hints, mistake tracking, and timer. Full WYSIWYG preview in editor.

Inspector panels on this block: Content, Game Settings. Those titles come from index.js, not from a shared template.

Behavior controls: “Default Difficulty” options: Easy, Medium, Hard, Expert.

Where to find it

Gutenberg inserter → Interactive → search “Sudoku” (block name `blockenberg/sudoku` in block.json). Style it in the sidebar after insert.

How to use Sudoku block for WordPress

  1. Install Blockenberg. Install from WordPress.org and activate the plugin.
  2. Insert the block. Edit a page, click +, search for “Sudoku”, insert it. Category: Interactive.
  3. Configure inspector controls that exist on this block. Open Content. Set “Default Difficulty”, “Max Mistakes Allowed”, “Hints Allowed”, “Show Timer”.
  4. Check the published page. The view script reads HTML data attributes: data-opts. The block editor preview may not run the same view script.

Inspector controls from this block’s code

ControlWhat the code does
Default DifficultySelect control; the chosen value is saved on the block. Options: Easy; Medium; Hard; Expert. block.json default: medium. Saved as `defaultDifficulty`.
Max Mistakes AllowedNumeric range control in the inspector. Range 1–10. block.json default: 3. Saved as `maxMistakes`.
Hints AllowedNumeric range control in the inspector. Range 0–10. block.json default: 3. Saved as `hintsAllowed`.
Show TimerOn/off toggle in the inspector. On by default. Saved as `showTimer`.
Show Mistake CounterOn/off toggle in the inspector. On by default. Saved as `showMistakes`.
Highlight Related CellsOn/off toggle in the inspector. On by default. Saved as `highlightRelated`.
Highlight Same NumberOn/off toggle in the inspector. On by default. Saved as `highlightSameNumber`.
AccentColor control in the inspector. block.json default: #6366f1. Saved as `accentColor`.
Given NumbersColor control in the inspector. block.json default: #1e1b4b. Saved as `givenColor`.
Entered NumbersColor control in the inspector. block.json default: #6366f1. Saved as `enteredColor`.
Error ColorColor control in the inspector. block.json default: #ef4444. Saved as `errorColor`.
Related HighlightColor control in the inspector. block.json default: #e0e7ff. Saved as `highlightBg`.
Selected CellColor control in the inspector. block.json default: #c7d2fe. Saved as `selectedBg`.
Grid BackgroundColor control in the inspector. block.json default: #ffffff. Saved as `gridBg`.
Section BackgroundColor control in the inspector. block.json default: #f5f3ff. Saved as `sectionBg`.
Title ColorColor control in the inspector. block.json default: #1e1b4b. Saved as `titleColor`.

What the front-end script actually does

When this is the right block

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 Sudoku block in WordPress?

Install Blockenberg from WordPress.org, edit a page in the block editor, click +, and search for “Sudoku”. It sits under Interactive. After insert, open Content and set “Default Difficulty”, “Max Mistakes Allowed”, “Hints Allowed”, “Show Timer”.

Does Sudoku need a server or extra plugin?

No. After Blockenberg is active, the view script runs in the browser with the values you saved on the block.

Is the Sudoku Gutenberg block free?

Yes. Sudoku ships inside Blockenberg. Get the plugin from WordPress.org — no paid add-on is required for this block.

Can I style Sudoku 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, Game Settings).

Related interactive blocks

Get Blockenberg

Install Blockenberg from WordPress.org, then insert Sudoku from the Gutenberg inserter.

Get Blockenberg