Bento Energy Dashboard with Rolling Digits
A bento-grid home energy dashboard where one clock drives hourly stacked bars with a moving selector, segmented controls that swap rows, battery and price windows, and place-by-place rolling digits. Springs drive sliders and fills.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "bento-energy-dashboard-with-rolling-digits" to this project. The full source is attached at the end of this prompt. Put the files under components/bento-energy-dashboard-with-rolling-digits/, install the listed dependencies with `npx expo install`, and render it on a route I can open. Keep the timing and easing values documented in the source comments. Replace the sample copy and artwork with content from my app, or leave placeholders and list what I still need to supply. === Source files are attached here for paid plans ===
Details
- Platforms
- Web
- Requires
- Expo SDK 54+
- Access
- Pro
- Updated
- 18 Nov 2026
- License
- Unlimited commercial projects
- Original design
- @ux_tanvir on X
Are you the designer? Ask us to change or remove this.
Add pieces from the terminal or let your agent fetch them. Until then, Copy prompt does the same job. Docs
What it does
A home-energy dashboard laid out as eight rounded cards on a pale page. Cards pop in one after another with a slight overshoot, then each runs its own loop. A solar card grows stacked bars and moves a dark tooltip along them. A savings card steps a highlight across small bars. A usage card toggles between Today and 7 days and swaps rows. A battery card shows a large percentage, a segmented level bar and a line with a sliding playhead. A prices card slides a four-hour bracket, a car card runs a charge ring with a countdown, a power-flow card switches which lines carry energy, and a twelve-spoke monthly chart advances one month at a time. All numbers roll digit by digit, and a shared clock keeps several cards on the same hour.
How it's built
The whole dashboard is a single function of time that returns a flat list of SVG nodes: rectangles, circles, paths, lines, text runs and groups with transforms and clips. The web preview renders it with a keyed SVG DOM, the React Native version maps the same nodes onto react-native-svg, so one core drives both. No chart library is used; bars, lines, rings and spokes are generated paths. The rolling digits are written for this core, one slot per character, with each digit sliding along a vertical strip using a spring. Time advances on a requestAnimationFrame loop.
Good for
- A smart-home or energy app overview screen
- Dashboards that need counters that roll when values change
- A reference for driving many chart types from one time value without a charting dependency
Dependencies
react-native-svgreact-native