r/reactjs • • 18h ago

Show /r/reactjs I made a React UI kit inspired by the Minitel, the French Videotex terminal: 40×25 grid, mosaic graphics, 1,200 baud reveal

2 Upvotes

videotex-ui is an open-source React UI kit that draws interfaces the way French Videotex did: a 40 × 25 character grid, 8 colors, 2 × 3 mosaic graphics and the 8 function keys of the Minitel.

Technical details

  • Values from the spec. Grid size, colors and their grey levels, mosaic codes and line timing were checked against the Minitel 1B specifications (STUM). Each value cites its source in docs/SPECS.md.
  • 1,200 baud reveal. Each character costs 10 bits on the line (start bit, 7 data bits, parity, stop bit), so 120 characters per second: a full page of 1,000 characters takes about 8.3 seconds.
  • Sharp mosaics. Each mosaic cell is drawn with CSS background layers in currentColor. The screen picks the largest whole-number scale that fits, so every dot lands on whole pixels.
  • Accessibility. Screen readers read the text of the page, not the grid. Titles, menus, inputs and function keys are real headings, lists, inputs and buttons. prefers-reduced-motion turns off blinking, flicker and the progressive reveal.
  • Two modes. Title, StatusRow, Menu, InputField, Frame and Mosaic work on the 40 × 25 screen, or on their own in a normal page.
  • Server-friendly. The core (PageBuilder, palettes, mosaics) is plain TypeScript without React, so a React Server Component can build a page and pass it to <Screen>.
  • Picture to mosaic. A converter turns a picture into mosaic characters in the browser (nothing is uploaded), and the library can export the result as a PNG or a ready-to-paste React component.
  • No runtime dependencies; React is a peer dependency.

Install

npm install videotex-ui

or copy the source into your project with the shadcn CLI:

npx shadcn@latest add https://cdn.jsdelivr.net/npm/videotex-ui/r/screen.json

Example

const page = new PageBuilder()
  .moveTo(3, 2).print('HELLO', { fg: 'yellow', size: 'double-size' })
  .moveTo(5, 2).print('Type your choice then ')
  .print(' Send ', { inverse: true })
  .build();

<Screen page={page} crt baud={1200} aria-label="Home" />

This is version 0.1.0. I would like feedback on the API and on accessibility in particular.

Minitel is a registered trademark of Orange. This project is independent and is not affiliated with, sponsored or endorsed by Orange.


r/reactjs • • 16h ago

Resource I built animated characters that replace the three-dot loading indicator

Thumbnail
mien.hazem.design
17 Upvotes

AI apps spend a lot of time thinking and most just show three dots. I wanted something that actually communicates what’s happening.

So I made Mien — 40 characters with up to 62 moods each (thinking, listening, searching, uploading, celebrating, sleeping…). You change the mood with one line of code and it morphs smoothly, even in the middle of an animation.

You can also design your own character in the studio with custom expressions and animations.

Works with React, Vue, Next.js, Svelte, or plain websites.


r/reactjs • • 20h ago

Show /r/reactjs Building an e-commerce dashboard with Next.js 16 and shadcn/ui

0 Upvotes

Hey everyone!

We've been spending quite some time building an e-commerce admin dashboard called Emporium, and I wanted to share a little look at what we've been working on.

The idea was to build something that feels like a real dashboard you'd actually use, rather than just putting together a collection of cards and tables.

A few things we've worked on:

  • Overview dashboard with sales analytics and statistics
  • Orders management and data tables
  • Customizable sidebar and topbar layouts
  • Light and dark themes
  • Font and theme customization
  • LTR and RTL support

It's built with Next.js 16, shadcn/ui and Base UI.

One thing we paid particular attention to was customization. We wanted people to be able to change the overall look and layout without having to dig through multiple files just to adjust basic settings.

You can take a look at the live demo here:
https://demo.shadcnstore.com/emporium/

Would love to hear what you think!

Especially curious:

  • What do you usually look for in an admin dashboard template?
  • Do you prefer sidebar or topbar layouts?
  • How important is having a built-in theme customizer?

r/reactjs • • 11h ago

Resource How much prop drilling is in popular React codebases? I measured 104 repos: 653 props carried through components that never read them

0 Upvotes

Everyone agrees prop drilling is bad and nobody agrees on where it starts, so I tried to define it strictly enough for a tool to find it.

The definition I ended up with: a prop goes through 3 or more components that do nothing with it except hand it to a child. Each of those components has to declare it, type it and forward it, and none of them needs it.

What does not count, because these were the false alarms:

- The component reads the prop for anything at all, even one condition

- It binds the prop to an event of a child, like `<Button onClick={onSave} />`. That is using a callback, not passing it along

- It spreads the whole props object down. That is a wrapper, a different problem

- The child comes from a library. The chain is only followed through components of the project itself

I ran this over 104 of the most starred TypeScript repos in the AI ecosystem, resolving components across files with the TypeScript compiler.

- 55 of the 104 had at least one drilled prop

- 653 drilled props in total, starting from 448 components

- The longest chains were 6 components deep. One example: `externalLink` enters at `InspectorReviewsView` and passes through `ReviewRuns`, `ReviewRunHistory`, `ReviewSummaryCard`, `GithubInlineComments` and `InlineCommentList` before `InlineCommentRow` finally reads it

- shadcn/ui: zero

Two things I did not expect:

  1. Drilling comes in bundles. When one prop goes down a chain, five more usually go down the same chain. The 653 props are really about 450 places, and often 3 or 4 structural decisions per repo. It is one fix, not twenty.
  2. The fix was almost never "add a context". In most chains the top component could simply render the bottom one and pass it as `children`, and the four components in between would stop knowing about the value.

A sample of these findings was checked by hand against the source, which is where the callback-binding rule above came from: the first version counted `onClick={onSave}` as a pass-through and it was wrong.

Per-repo numbers, prop drilling has its own column: https://github.com/PatternVoid/unknot/blob/main/LEADERBOARD.md

The tool is open source and I wrote it: https://github.com/PatternVoid/unknot. `npx unknot --rule prop-drilling` lists the chains in your project, with files and lines.

Where would you draw the line? Is 3 pass-through components too strict, or too lenient?