Write interactive UI behaviors in your native language. 43 commands, 24 supported languages, and flexible bundle options from 1.9KB to 203KB.
on click toggle .active on me
on click increment :count then
put :count into me
on pointerdown
repeat until event pointerup
set rand to Math.random() * 360
transition *background-color
to `hsl($rand 100% 90%)`
over 250ms
end
LokaScript supports 24 languages with natural grammar transformation. The same logic, expressed naturally in each language:
on click toggle .active on me
クリック で 私 の .active を 切り替え
al hacer clic alternar .active en mi
عند النقر بدّل .active على نفسي
| Bundle | Size | Commands | Best For |
|---|---|---|---|
lokascript-lite.js |
1.9 KB | 8 | Minimal interactions (toggle, add, remove) |
lokascript-lite-plus.js |
2.6 KB | 14 | More commands + i18n aliases |
lokascript-hybrid-complete.js |
7.3 KB | 21 + blocks | Most projects (if/else, repeat, fetch) |
lokascript-hybrid-hx.js |
9.5 KB | 21 + htmx | htmx attribute compatibility |
lokascript-browser.js |
203 KB | 43 | Full features + semantic parser |
Send, receive, filter, queue, and debounce events with ease. Chain events together for complex interactions.
No promises, async/await, or callback hell. LokaScript transparently handles asynchronous behavior.
Compatible with most _hyperscript code. Migrate existing projects with minimal changes.
Only include the commands you use. The Vite plugin generates optimal bundles automatically.
AI-friendly parsing that understands intent across all 24 languages with confidence scoring.
22 tools for AI assistants: validation, translation, pattern search, and code generation.