Population Pyramid
Men and women by age group; switch years and the bars morph to show a population ageing.
| Age | Men | Women |
|---|---|---|
| 0–9 | 120 | 113 |
| 10–19 | 100 | 93 |
| 20–29 | 80 | 76 |
| 30–39 | 62 | 60 |
| 40–49 | 46 | 44 |
| 50–59 | 32 | 31 |
| 60–69 | 20 | 21 |
| 70–79 | 9 | 10 |
| 80+ | 3 | 4 |
Edit with AIPro
Describe a change to Population Pyramid and get the updated code. The live preview above stays as the original.
Quality report
Kinetiq VerifiedLoads cleanly
No errors on phone and desktop screens.
Fits a phone screen
No sideways scrolling at 375 px wide.
No serious accessibility problems
Passed the axe-core WCAG 2.1 A/AA check.
- Size (gzipped)
- 1.6 KB
- Extra packages
- motion
- Reduced motion
- Respected
Tested automatically in Chrome 158.0.8127.36 with axe-core 4.14.1. Automated tools catch only part of all accessibility problems, so treat this as a solid minimum, not a full audit.
Installation
One command
Adds the file to components/ui/population-pyramid.tsx and installs motion for you.
Run login once. It needs a free account, because the code is for signed-in users only. Get your token.
Or do it by hand
Install the dependencies
$ npm i motion lucide-reactSign in, open the Code tab above and copy it into
components/ui/population-pyramid.tsxUse it
The file exports the component and a
Demoshowing typical usage. Import whichever you need.