r/javascript • u/Kabra___kiiiiiiiid • Mar 23 '26
r/javascript • u/faizswitcher1 • Mar 23 '26
Switch Framework (Electron Desktop apps + web apps)
npmjs.comI created a lightweight javascript framework ,setup is like next plus react but i wrote my own backend codes and frontend one to help devs in creating web apps without runninf a build,they are running on runtime,routing,state management,layout management,compoment creation, already done
extras theming and server initialization and easy toput middlewares ..
i just want people to test it ,and give me feedback on it coz i tested it myself i am somehow confident
the main issue that bothered me on react and those new hooks added everyday to wrap up.the problem of rerendering the entire compoment even if the small changes happened on the input and clear the input bothered me earlier,also animation issues to use thoe renaimated and babel stuff ...even if i know how to implement them all but i spend much time with it and just decide to recreate something .and i asked myself why just not following the web standards like building on top of them instead of recreating new standards that led us to building and suffering on dependencies,on frontend i just utilized web components they are good and the best and i created a good structure and lifecycle so that is it easy to define simple components but deep down they ll render web components.they are well encapsulated on styles ,and if someone wants to contribute just hit me up. i am ready to cooperate with other peoples who think it is usefull,and i am not perfect i am accepting critics they make me improve myself better
npm pack link
r/javascript • u/equinusocio • Mar 23 '26
Showcase: Design Tokens Explorer
dtexplorer.ioIf you're working with medium-to-large design systems, you know exactly how painful it is to track design token adoption in your code, or how hard it can be to visualise the tokens you actually need to use.
With Design Tokens Plugin (DTE), you can load your tokens from local or remote files and:
- Find any design token across all your collections in seconds with fast fuzzy search. π
- Organize and search tokens from multiple collections, design systems, or brand libraries. π
- Check your codebase against hard-coded values that can be replaced with a design token. β
- Tokens appear directly in editor suggestions, so you can use them easily in your preferred format. β¨
- Instantly preview colors, font sizes, spacing, and other values before inserting them. π¨
- Search tokens across your codebase, copy them instantly, or insert them at the cursor with a single click. π±οΈ
- This is also my first agentic and speech-driven product, developed using Claude Code and stream-coding. π€π»
The plugin is currently in beta an I would like to get as many feedback as possible during this launch period.
r/javascript • u/danfry99 • Mar 22 '26
Bonsai now has context-aware autocomplete for expression editors - built for rule builders and admin tools
danfry1.github.ioLast week I shared bonsai here - a tiny fast sandboxed expression evaluator for JS. The response was incredible and the feedback shaped where I took the project next.
The most common question was: "How do I give non-technical users a good editing experience?" Fair point. An expression language is only useful if people can actually write expressions. So I built an autocomplete engine.
import { bonsai } from 'bonsai-js'
import { strings, arrays } from 'bonsai-js/stdlib'
import { createAutocomplete } from 'bonsai-js/autocomplete'
const expr = bonsai().use(strings).use(arrays)
const ac = createAutocomplete(expr, {
context: {
user: { name: 'Alice', age: 25, plan: 'pro' },
items: [{ title: 'Widget', price: 9.99 }],
},
})
// Property completions with inferred types
ac.complete('user.', 5)
// β [{ label: 'name', detail: 'string', kind: 'property' },
// { label: 'age', detail: 'number', kind: 'property' },
// { label: 'plan', detail: 'string', kind: 'property' }]
// Type-aware method suggestions
ac.complete('user.name.', 10)
// β [{ label: 'trim()', detail: 'string β string', kind: 'method' },
// { label: 'upper()', detail: 'string β string', kind: 'method' }, ...]
// Lambda property inference
ac.complete('items.filter(.', 14)
// β [{ label: 'title', detail: 'string', kind: 'property' },
// { label: 'price', detail: 'number', kind: 'property' }]
// Pipe transform suggestions (auto-filtered by type)
ac.complete('user.name |> ', 13)
// β only string-compatible transforms (trim, upper, lower...)
// array transforms like filter/sort are excluded automatically
It's a pure data API. No DOM, no framework dependency. You get back an array of completion objects with labels, types, insert text, and cursor offsets. Plug it into Monaco, CodeMirror, a custom dropdown, whatever you want.
There's a live Monaco integration demo so you can try it in the browser: https://danfry1.github.io/bonsai-js/monaco-demo.html
The playground is also powered by the autocomplete API with a vanilla JS dropdown: https://danfry1.github.io/bonsai-js/playground.html
The docs cover both patterns: https://danfry1.github.io/bonsai-js/docs.html#autocomplete-editor
What makes it interesting:
-
Eval-based type inference - it doesn't just do static lookups.
user.name.trim().actually evaluates the chain to figure out the return type, then suggests the right methods -
Lambda-aware - knows that inside
users.filter(.the dot refers to array element properties, not the array itself. Works with nested lambdas too:groups.map(.users.filter(. -
Zero-config transform filtering - auto-probes each transform with sample values to figure out type compatibility.
name |>only suggests string transforms without you having to configure anything -
Security-aware - if your bonsai instance has
allowedPropertiesordeniedProperties, autocomplete respects the same policy. No property leakage through suggestions -
Tolerant tokenization - works on incomplete, mid-edit expressions. Users are always mid-keystroke, so this matters
-
Fuzzy matching -
tLCmatchestoLowerCase, camelCase-aware scoring -
Pre-computed method catalog - method completions are built once and cached, 3-4x faster than generating on every keystroke
Use cases:
- Rule builder UIs where admins define conditions like
order.total > 100 && customer.tier == "gold" - Filter/condition editors in dashboards
- Formula fields in spreadsheet-like apps
- Any place where you want users to write expressions but need to guide them
The autocomplete runs on the same bonsai instance you already use for evaluation, so context, transforms, and security config are all shared. One setup, both features.
v0.3.0 - zero dependencies, TypeScript, tree-shakeable via bonsai-js/autocomplete subpath export.
GitHub: https://github.com/danfry1/bonsai-js
npm: https://www.npmjs.com/package/bonsai-js
npmx: https://npmx.dev/package/bonsai-js
r/javascript • u/subredditsummarybot • Mar 23 '26
Subreddit Stats Your /r/javascript recap for the week of March 16 - March 22, 2026
Monday, March 16 - Sunday, March 22, 2026
Top Posts
Β
Most Commented Posts
| score | comments | title & link |
|---|---|---|
| 3 | 34 comments | "Vite+ is kinda underwhelming" - a comprehensive review of the new release |
| 8 | 31 comments | ORM Comparison (2026) |
| 6 | 25 comments | Gea β The fastest compiled UI framework |
| 6 | 17 comments | Mandelbrot.js β Fractal Explorer in WebGL with Quad-Trees and Double-Emulation |
| 1 | 15 comments | [AskJS] [AskJS] writing a complex web app's frontend using only vanilla JavaScript (no frameworks) |
Β
Top Ask JS
| score | comments | title & link |
|---|---|---|
| 4 | 6 comments | [AskJS] [AskJS] Tools to Learn JS (as a beginner) |
| 2 | 5 comments | [AskJS] [AskJS] What are your favorite open-source projects right now? |
| 1 | 8 comments | [AskJS] [AskJS] Making an SVG interactable |
Β
Top Showoffs
Β
Top Comments
Β
r/javascript • u/Boydbme • Mar 23 '26
ArrowJS 1.0: a tiny, performant, no-build-step-required UI framework. Now with WASM sandboxes for safe execution of agent-generated UIs.
arrow-js.comr/javascript • u/cochinescu • Mar 23 '26
agentmarkup: Vite/Astro plugin that makes your site machine-readable for AI agents at build time
github.comr/javascript • u/Terrible_Village_180 • Mar 22 '26
I built a tiny utility to know when your form is dirty
everythingfrontend.comWorks with native HTML forms and controlled state (React, Vue, Svelte). Same API, same result. No React, no Lodash, no form library. Pure TypeScript class you drop into any project.