Skip to main content

Examples

1 min read

Examples

Learn Directive by playing with it. Every example runs live in the browser, and every line of source code is visible below the demo.


Games & Puzzles

Sudoku

The perfect Directive showcase. Sudoku is literally a constraint satisfaction problem – no duplicates in rows, columns, or 3×3 boxes – and those rules map 1:1 to Directive's constraint–resolver flow. Type a number, watch constraints evaluate by priority, and see conflicts light up instantly.

Three difficulty modes, a countdown timer with urgency colors, pencil marks, hints, and full undo/redo via time-travel debugging. All in ~250 lines of Directive code.

Directive features: 14 auto-tracked derivations, prioritized constraints (200/100/90/70), temporal constraints, runtime reconfiguration, time-travel debugging


Next Steps

Previous
Lit Controllers
Next
Sudoku

We care about your data. We'll never share your email.

Powered by Directive. This signup uses a Directive module with facts, derivations, constraints, and resolvers – zero useState, zero useEffect. Read how it works

Directive - Constraint-Driven State Management for TypeScript