You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While building an admin dashboard for Online Ticketing System using Material Tailwind UI, I found myself needing an <Input /> field that includes both a left (leading) icon and a right (trailing) icon.
Since the current component only supports an icon on the right side, I ended up creating a custom wrapper component that extends <Input /> to support a leading icon as well.
That made me realize and thought this might be a useful enhancement for others too, and could be built-in directly.
Suggestion improvement:
Allow an optional leading icon, rendered inside the input field on the left side.
Idea in my mind:
<InputleadingIcon={IconComponent}// new optional propicon={EyeIcon}// existing right icon/>or```jsx<InputstartIcon={StartIcon}// leading iconendIcon={EndIcon}// trailing icon/>
Would love to hear your feedback!
Happy to contribute a PR if it's something the team finds useful.
Thanks so much for the great work on Material Tailwind UI.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi material tailwind team.
While building an admin dashboard for Online Ticketing System using Material Tailwind UI, I found myself needing an
<Input />field that includes both a left (leading) icon and a right (trailing) icon.Since the current component only supports an icon on the right side, I ended up creating a custom wrapper component that extends
<Input />to support a leading icon as well.That made me realize and thought this might be a useful enhancement for others too, and could be built-in directly.
Suggestion improvement:
Allow an optional leading icon, rendered inside the input field on the left side.
Idea in my mind:
Would love to hear your feedback!
Happy to contribute a PR if it's something the team finds useful.
Thanks so much for the great work on Material Tailwind UI.
Beta Was this translation helpful? Give feedback.
All reactions