Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Menus with React

Public visualization

Menus with React

0 stars0🌍 Public
OOscar
Last edited Jan 27, 2026
Created on Jan 26, 2026
Forked from React Starter

This example shows a React-based dropdown menu for selecting a pet, with the current choice logged to the console. It demonstrates how React state and props manage a controlled `<select>` element through a reusable `Dropdown` component, which maps over an options array. The code uses React’s `useState` and `ReactDOM.render`, with no direct d3 APIs; instead, D3.js is loaded via CDN but remains unused except as a dependency. The styling uses large fonts for the label and select, with smaller font for options.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed