Here are some best practices and rules to follow for creating a high-quality, mobile-first web app with excellent UI/UX using Tailwind, React, and Firebase:
Add this skill
npx mdskills install PatrickJS/cursor-tailwind-react-firebaseMobile-first design guidelines for React+Tailwind+Firebase with some actionable practices but lacks clear agent triggers
1Here are some best practices and rules to follow for creating a high-quality, mobile-first web app with excellent UI/UX using Tailwind, React, and Firebase:23Mobile-First Design:4Always design and implement for mobile screens first, then scale up to larger screens.5Use Tailwind's responsive prefixes (sm:, md:, lg:, xl:) to adjust layouts for different screen sizes.67Consistent Design System:8Create a design system with consistent colors, typography, spacing, and component styles.9Utilize Tailwind's configuration file (tailwind.config.js) to define your custom design tokens.1011Performance Optimization:12Use React.lazy() and Suspense for code-splitting and lazy-loading components.13Implement virtualization for long lists using libraries like react-window.14Optimize images and use next/image for automatic image optimization in Next.js.1516Responsive Typography:17Use Tailwind's text utilities with responsive prefixes to adjust font sizes across different screens.18Consider using a fluid typography system for seamless scaling.1920Accessibility:21Ensure proper color contrast ratios using Tailwind's text-* and bg-* classes.22Use semantic HTML elements and ARIA attributes where necessary.23Implement keyboard navigation support.2425Touch-Friendly UI:26Make interactive elements (buttons, links) at least 44x44 pixels for easy tapping.27Implement touch gestures for common actions (swipe, pinch-to-zoom) where appropriate.2829USE THE IMAGES IN THE MOCKUPS FOLDER AS EXAMPLE OF HOW TO STYLE THE APP AND CREATE THE LAYOUT3031WHEN CREATING A FILE DON'T CONFLICT IT WITH .TSX AND .JSX FILES3233Firebase Best Practices:34Implement proper security rules in Firebase.35Use Firebase SDK's offline persistence for better performance and offline support.36Optimize queries to minimize read/write operations.3738Error Handling and Feedback:39Implement proper error boundaries in React.40Provide clear feedback for user actions (loading states, success/error messages).4142Animation and Transitions:43Use subtle animations to enhance UX (e.g., page transitions, micro-interactions).44Utilize Tailwind's transition utilities or consider libraries like Framer Motion.4546Form Handling:47Use libraries like Formik or react-hook-form for efficient form management.48Implement proper form validation with clear error messages.4950Code Organization:51Follow a consistent folder structure (e.g., components, hooks, pages, services).52Use custom hooks to encapsulate and reuse logic.5354Native-like Features:55Implement pull-to-refresh for content updates.56Use smooth scrolling and momentum scrolling.57Consider using libraries like react-spring for physics-based animations.5859Here’s a concise prompt for a language model to help you with the logic for creating AI-powered medication insights in your app:6061Prompt:62Design a feature for a pill management app that tracks user interactions with medications (Take/Skip) and generates monthly adherence reports.6364The app should:6566User Interface:67Display pills for "Morning," "Afternoon," and "Night" with buttons for "Take" and "Skip."68Show a confirmation modal for user actions.6970Data Collection:71Log user interactions (pill ID, action, timestamp, notes) in a database.7273Monthly Report:74Aggregate data to calculate total pills scheduled vs. taken, adherence percentage, and trends (e.g., frequently skipped pills).7576AI Insights:77Use basic statistical analysis to generate personalized suggestions based on user feedback (e.g., side effects, missed doses).7879Dashboard:80Create a section for users to view their monthly reports, including adherence percentage, trends, and AI-generated suggestions.8182This prompt provides a clear and structured request for assistance in developing the feature, focusing on key components and functionality.8384
Full transparency — inspect the skill content before installing.