react-tailwindcss-select
react-tailwindcss-select copied to clipboard
Change style of placeholder
How do I change the style/classname for the placeholder ?
this worked for me, to style based on having a value set or not by Select:
<Select
value={myValueVar}
classNames={{ menuButton: ({ isDisabled }: { isDisabled?: boolean } = {}) => clsx( isDisabled && "bg-gray-200", myValueVar ? "text-gray-500" : "italic text-slate-400", "flex text-sm text-gray-500 border border-gray-300 rounded shadow-sm transition-all duration-300 focus:outline-none") }}
onChange= etc...