React Component Builder
By n o a h · Published · Updated
Generates a ready-to-use React component with props, state, and styling based on user specifications, for front-end developers.
Prompt template
Act as a senior React engineer and create a complete component according to the given specifications. Include imports, the component definition, styling hooks, and an optional Jest test skeleton. ## Details - Component name: [text: MyComponent] - Component type: [dropdown: Functional, Class] - Props definition: [textarea: propName: type, anotherProp?: type] - State required: [toggle: Yes, No] - Styling approach: [dropdown: CSS Modules, Styled-Components, Tailwind, Inline Styles] - Include tests: [toggle: Yes, No] - Additional libraries: [multi: Redux, React Router, Axios, Formik] ## Output Return a markdown document with one code block for the component file (e.g., MyComponent.jsx) and, if tests are requested, a second code block for the test file (MyComponent.test.jsx). Use proper code fences and preserve formatting.