# Prompt 10: Search Box with Floating Action Button Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should have a floating action button (FAB) that allows the user to initiate a search when clicked. 3. The search box should expand when clicked and show the search input field. 4. The design should be minimalistic, with no visible input field until the user clicks the floating button. 5. The floating button should be styled as a circular search icon. 6. Provide smooth animations for the search box expansion and collapse. Additional considerations: 1. Ensure the search box and floating action button are responsive. 2. The FAB should be large enough for easy tapping on mobile devices. 3. Use Tailwind CSS for transitions and responsiveness. Expected output: A floating action button that expands into a search box on click, with a responsive and minimalist design.
# Prompt 9: Search Box with Dynamic Placeholder Text Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should have dynamic placeholder text that changes depending on the screen size. 3. On desktop, the placeholder should display “Search for products” and on mobile, it should display “Search...”. 4. The input field should have a magnifying glass icon on the left and be responsive. 5. The button should be a simple magnifying glass and should be positioned on the right side. 6. Add smooth transitions when switching between the desktop and mobile placeholders. Additional considerations: 1. Ensure the search box adapts to different screen sizes smoothly. 2. The design should be minimalist and modern with clean typography. 3. Use Tailwind CSS for responsive layout and design. Expected output: A responsive search box with dynamic placeholder text and a magnifying glass button, styled with Tailwind CSS.
# Prompt 8: Search Box with Icon and Loading Indicator Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should have a search icon inside the input field on the left side. 3. When the user starts typing, a loading spinner should appear inside the search box. 4. The input field should resize depending on the screen size, being larger on desktop and smaller on mobile. 5. The button should be placed inside the input box on the right side. 6. The input field should have rounded corners and a soft shadow effect. Additional considerations: 1. Ensure the loading indicator is only visible during search activity. 2. The design should be clean and responsive, with a focus on performance. 3. Use Tailwind’s utility classes for spacing, alignment, and responsiveness. Expected output: A search box with an icon and a loading spinner, responsive design with smooth transitions using Tailwind CSS.
# Prompt 7: Search Box with Full-Screen Expansion on Focus Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should expand to full-screen width when focused, allowing the user to type comfortably. 3. The input field should have rounded corners and a subtle box shadow. 4. The button should be positioned on the right side of the input and be styled as a search icon. 5. When not focused, the search box should be contained within a fixed width. 6. Provide smooth animations when transitioning between focus and non-focus states. Additional considerations: 1. Ensure that the full-screen expansion works well on both desktop and mobile. 2. Use Tailwind’s transition classes for smooth animations. 3. The search box should collapse to a compact size when the user clicks away. Expected output: A responsive search box that expands to full width on focus and contracts when not focused, with smooth transition effects.
# Prompt 6: Search Box with Icon and Clear Button Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should have a magnifying glass icon inside the input field on the left side. 3. The input field should have a clear button (an X icon) that appears when the user types. 4. The button should be positioned inside the input box at the right side. 5. Add responsive behavior, making the search box adjust its size based on screen width. 6. The input field should have a subtle shadow effect on focus. Additional considerations: 1. Use Tailwind CSS for a responsive design with appropriate spacing. 2. Ensure the clear button is only visible when text is entered into the input field. 3. The design should be clean and functional with no excessive decoration. Expected output: A search box with an icon and a clear button, responsive design using Tailwind CSS, and smooth transitions for focus and input changes.
# Prompt 5: Search Box with Floating Label Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should have a floating label that appears above the input field when the user focuses on it. 3. The input field should be responsive, expanding on larger screens and shrinking on smaller screens. 4. Add a search icon inside the input field. 5. The submit button should be placed on the right side of the input box. 6. Provide a smooth transition for the floating label effect. Additional considerations: 1. Ensure the search box is fully responsive for mobile, tablet, and desktop devices. 2. The search icon should be centered within the input box. 3. Use Tailwind’s transition utilities for the floating label effect. Expected output: A responsive search box with a floating label and search icon inside, adapting seamlessly to different screen sizes.
# Prompt 4: Search Box with Dropdown Suggestions Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should include a dropdown that shows suggestions as the user types. 3. The input field should be responsive, adjusting size based on screen width. 4. The dropdown suggestions should appear below the input and should be clickable. 5. The input should have rounded corners and a shadow effect when focused. 6. The submit button should be styled as a simple magnifying glass icon. Additional considerations: 1. Ensure the dropdown disappears when the user clicks outside the search box. 2. Use Tailwind for responsive design, ensuring it looks good on both small and large screens. 3. The search box should have a smooth transition for input field and dropdown visibility. Expected output: A responsive search box with a dropdown for suggestions and a magnifying glass button, designed with Tailwind CSS.
# Prompt 3: Full-Width Search Box on Desktop Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. On desktop, the search box should stretch to the full width of the container, with padding. 3. On mobile, the search box should be a fixed width. 4. The search button should be located on the right side of the input. 5. Include a subtle focus effect on the input field when clicked. 6. Add a placeholder text “Search...” in the input field. Additional considerations: 1. The design should adapt from mobile to desktop seamlessly. 2. The button should be large enough for mobile use. 3. The design should be clean with no borders or excessive elements. Expected output: A responsive search box that stretches on desktop and is compact on mobile, with a simple design and a focus effect on the input.
# Prompt 2: Mobile-First Search Box Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should be mobile-first, meaning it should adapt to small screens and gradually scale up for larger devices. 3. The input should expand in width on larger screens and collapse to a smaller size on mobile. 4. Add a search icon on the left side of the input field and a submit button on the right. 5. The input field should have padding and rounded corners. 6. The button should have a hover effect to change color. Additional considerations: 1. Ensure the search box is easily tappable and responsive. 2. The layout should use flexbox or grid to ensure proper alignment. 3. Provide a smooth transition for width change between mobile and desktop. Expected output: A mobile-first responsive search box that adjusts its size based on screen width.
# Prompt 1: Responsive Search Box with Tailwind CSS Help me write a responsive front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should be centered and responsive, resizing based on screen width. 3. Add a magnifying glass icon inside the search box. 4. The input field should be at least 80% of the container width on desktop and full-width on mobile. 5. The button should be a rounded search icon and positioned at the right of the input. 6. The design should be minimalistic, with a clean and modern look. Additional considerations: 1. Ensure the search box is mobile-friendly. 2. The input box should have a subtle hover effect. 3. The button should be easily tappable on smaller screens. Expected output: A responsive search box with Tailwind CSS, a magnifying glass icon, and mobile-friendly behavior.
# Prompt 5: Search Box with Loading Indicator Help me write a front-end style for a search box with a loading indicator using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should have a rounded design with a border and subtle shadow. 3. Add a search button with a spinning loader (animated) on click. 4. The loading indicator should appear inside the button while the search is in progress. 5. The search input should have a clear icon (X) to remove entered text. Additional considerations: 1. The search box should be centered and have appropriate spacing for a clean layout. 2. The loader should appear smoothly when the button is clicked. 3. Add a smooth transition effect for focus and hover states. Expected output: A search box with a loading spinner on the button while searching and a clean, modern design using Tailwind CSS.
# Prompt 4: Search Box with Autocomplete and Suggestions Help me write a front-end style for a search box with autocomplete and suggestions using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should have a drop-down list that shows suggestions below it as the user types. 3. Each suggestion should have a hover effect (color change on hover). 4. The search box should have a border with rounded corners and padding. 5. Add a clear button (an X icon) inside the input to clear the search field. Additional considerations: 1. Ensure that the drop-down list disappears when the user clicks outside the search box. 2. The search box should expand slightly when the user focuses on it. 3. Include a smooth transition effect for hover effects and suggestion visibility. Expected output: A search box that shows suggestions below the input, with hover effects, a clear button, and proper mobile responsiveness.
# Prompt 3: Minimalist Search Box with Tailwind Help me write a front-end style for a minimalist search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS for styling. 2. The search box should have a clean, minimalist design with no borders and subtle padding. 3. The search input should have a small magnifying glass icon at the left, and no button (only the input field). 4. The input box should stretch to fill the width of the container, but not exceed 500px in width. 5. On focus, the input box should expand slightly and have a soft glow effect around it. 6. Add a placeholder inside the search box with the text "Search...". Additional considerations: 1. The search input should adapt to different screen sizes. 2. No background color should be applied, making it a clean design. 3. Use Tailwind CSS for mobile responsiveness and scaling. Expected output: A minimalist search box with an icon on the left, clean design, subtle focus effects, and no buttons.
# Prompt 2: Advanced Search Box with Custom Styles Help me write a front-end style for an advanced search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS (add link to tailwind.min.css in the head). 2. The search box should have a custom gradient background, rounded corners, and a subtle box shadow. 3. Add a clear icon to the search input field when text is entered, so the user can clear the input. 4. The search button should have a custom hover effect with a transition. 5. The input box should have a search icon on the left side and should expand as the user types. 6. The search button should be placed on the right side of the input box. Additional considerations: 1. The search box should have a smooth transition for hover effects. 2. Ensure that the search button is large enough to tap on mobile devices. 3. Provide a fallback for browsers that do not support Tailwind CSS. Expected output: A visually appealing and modern search box with a gradient background, rounded corners, hover effects, and icons.
# Prompt 1: Basic Search Box Using Tailwind CSS Help me write a front-end style for a search box function using HTML+CSS Code requirements: 1. Use Tailwind CSS (link to the minified version of tailwind in the HTML head). 2. The search box should have a rounded, clean design with padding and a border. 3. Add a magnifying glass icon to the left side of the input box. 4. Add hover effects for the input box when the user hovers over it. 5. The button should have a clear, distinguishable style with a hover effect. 6. The search box should be centered on the screen. Additional considerations: 1. Use Tailwind CSS classes for responsiveness. 2. The search button should be easily clickable and appear next to the search input. 3. Ensure the design is mobile-friendly. Expected output: A search bar with an icon, a hover effect, and a clear button, centered on the screen.