React Assignment – 2
Basic Questions
- Apply inline styling to a <p> element to make its text red.
- Set the background color of a <div> using inline styles.
- Pass an inline style object as a variable and apply it to a component.
- Create a Button component with CSS modules for style isolation.
- Use a CSS module to make one heading blue and another green.
- Add hover effect inside a CSS module and apply it to a button.
- Create two components sharing the same CSS module but with different classes.
- Demonstrate dynamic class switching with CSS modules based on props.
- Set default inline styles for a container (width: 200px, height: 200px).
- Style a paragraph with both inline styles and a CSS module class (combined).
- Create a styled Button using styled-components with custom color.
- Add a hover effect to styled-components button.
- Demonstrate passing props to styled-components (e.g., primary button).
- Setup Tailwind CSS in a React project.
- Use Tailwind class utilities (bg-blue-500 text-white p-2) for a button.
- Create a responsive layout (2 columns → 1 column on mobile) using Tailwind.
- Add a CSS :hover style to enlarge a button slightly.
- Animate text color fading using CSS transition.
- Create a simple keyframe animation (bounce) in CSS and apply it to a <div>.
- Apply transition: all 0.3s ease; to make background-color change smooth on hover.
Intermediate Questions
- Create a global CSS file and apply styles across multiple components.
- Compare styling conflicts between CSS modules vs global CSS.
- Create a styled navbar using styled-components.
- Implement dark mode toggle using styled-components + props.
- Build a reusable Tailwind button component (primary, secondary).
- Create responsive text with Tailwind (text-lg md:text-2xl lg:text-4xl).
- Build a two-column responsive grid using Tailwind utilities.
- Create a styled-components card that changes shadow on hover.
- Use conditional className in React to highlight active navigation link.
- Use CSS modules to style a parent-child component differently.
- Animate a button using CSS keyframes (scale up and back).
- Create a fade-in effect with CSS opacity + transition.
- Animate mounting/unmounting a component with React Transition Group.
- Add enter & exit animations to a modal with React Transition Group.
- Use Framer Motion to animate a button sliding from left to right.
- Animate list items one after another using Framer Motion staggerChildren.
- Build a card flip animation using CSS keyframes.
- Animate hover scaling using Framer Motion whileHover.
- Animate a fade + slide effect on route transitions with React Transition Group.
- Compare CSS transition vs React Transition Group for component fade.
Advanced Questions
- Build a responsive landing page styled using Tailwind CSS utilities.
- Design a theme switcher (light/dark mode) using styled-components and CSS variables.
- Create a dashboard UI with reusable styled cards using CSS modules + Tailwind for layout.
- Build a profile card component library with styled-components for reuse across a project.
- Build a to-do list where items fade in on add and fade out on delete using React Transition Group.
- Animate a modal popup with Framer Motion (scale + fade effect).
- Create a carousel with slide animations using Framer Motion.
- Animate a navbar underline sliding effect on hover using CSS keyframes.
- Build a page transition system where each route fades/slides in using Framer Motion with AnimatePresence.
- Combine CSS-in-JS (styled-components) with Framer Motion to create an animated responsive card grid.