Skip to main content
100%

New Menus

✓ Published0🌍 Public
CCodeDuckie99
Last edited Mar 13, 2021
Created on Mar 13, 2021
Forked from Menus with React

This example demonstrates a reusable dropdown menu component built with React and the useState hook. It displays a list of pet options—dog, cat, hamster, parrot, spider, and goldfish—with a default selection of hamster, and logs the currently selected value to the console. The Dropdown component takes options, an id, a selected value, and a change handler as props, rendering a native HTML select element. The app uses ReactDOM to mount the component, with styling applied via CSS for large text and a hidden overflow.

AI-generated description

React starter code.

See also React Starter.

MIT Licensed

Similar vizzes