Skip to content

Instantly share code, notes, and snippets.

View Seeyko's full-sized avatar
🤯
Working too much

Tom Andrieu Seeyko

🤯
Working too much
View GitHub Profile
@Seeyko
Seeyko / Autocomplete.tsx
Created November 20, 2023 08:48
React Autocomplete, with tailwind and daisyui
import React, { useState } from 'react';
const noOptionTitle = "No option !";
const Autocomplete = ({ options, name }: { options: string[], name: string }) => {
const [activeOption, setActiveOption] = useState(0);
const [filteredOptions, setFilteredOptions] = useState(options);
const [showOptions, setShowOptions] = useState(false);
const [userInput, setUserInput] = useState('');