React input element design question

Hello everyone,

I am making a react web app and I am using Tachyons CSS for my web app’s CSS. In my web app. I have an Input Component for forms and I want to have 2 different Input Component designs:
----top down: label at the top and the input box at the bottom
----left right: label on the left and the input box on the right

The question is should I create two different Input Components for that purpose or should I pass the specific props which is inline-block or block everytime I want them to be different? Which one is a better way in terms of design pattern, efficiency, or maintainability?

Just in case no one here knows the answer to your question, there are some great places to get answers to React questions that are listed on the React community page.  If your problem is more on the Tachyons side, there are two places you can ask Tachyons questions from the experts.

1 Like