import { useEffect, useState } from "react";
import "./App.css";
function App() {
const [continents, setContinents] = useState([]);
const [inputValue, setInputValue] = useState("");
const [countries, setCountries] = useState([]);
const [isVisible, setIsVisible] = useState(false);
return (
<div className="App">
<h1>Select Continent</h1>
<select className="custom-select" onChange={(e) => setInputValue(e.target.value)}>
<option selected hidden>Select a Continent</option>
</select>
</div>
);
}
export default App;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter