Challenge: Use CSS Modules in React
Task: Building a User Card with CSS Modules
In this task, you'll design a user card displaying the user's photo and relevant information. Apply appropriate styles to each component and ensure their proper utilization. Our goal is to achieve such UI:
The task is:
- In the
UserInfo.jsx
file, import the styles file (UserInfo.module.css
) and assign it ass
for style association. - To complete the app building, import the
UserInfo.jsx
file into theApp.jsx
.
- To import a file, use theΒ
import
Β statement and specify the source file. - To associate the CSS file with theΒ s, import it usingΒ
import s from "path_to_the_file";
. - To utilize theΒ UserInfoΒ component within theΒ
App
Β component, use the syntaxΒ</UserInfo />
.
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 10
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 2.17
Challenge: Use CSS Modules in React
Swipe to show menu
Task: Building a User Card with CSS Modules
In this task, you'll design a user card displaying the user's photo and relevant information. Apply appropriate styles to each component and ensure their proper utilization. Our goal is to achieve such UI:
The task is:
- In the
UserInfo.jsx
file, import the styles file (UserInfo.module.css
) and assign it ass
for style association. - To complete the app building, import the
UserInfo.jsx
file into theApp.jsx
.
- To import a file, use theΒ
import
Β statement and specify the source file. - To associate the CSS file with theΒ s, import it usingΒ
import s from "path_to_the_file";
. - To utilize theΒ UserInfoΒ component within theΒ
App
Β component, use the syntaxΒ</UserInfo />
.
Everything was clear?
Thanks for your feedback!
SectionΒ 2. ChapterΒ 10