This is a solution to the Coding bootcamp testimonials slider challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the optimal layout for the component depending on their device's screen size
- Navigate the slider using either their mouse/trackpad or keyboard
- Solution URL: (https://github.com/Deva-Mari/testimonial-slider)
- Live Site URL: (https://musical-rugelach-67f52c.netlify.app/)
- Semantic HTML5 markup
- Mobile-first workflow
- Sass
- React - JS library
- Typescript
- Practiced useState and useEffect
const [image, setImage] = useState("");
const [person, setPerson] = useState(0);
useEffect(() => {
import(`./assets/${data[person].img}`).then((image) =>
setImage(image.default)
);
}, [person]);
- improved Layouting skills
- learned how to attach keydown Event to div
const keyPressHandler = (e: React.KeyboardEvent<HTMLDivElement>) => {
if (e.code === "ArrowRight") {
nextClickHandler();
}
if (e.code === "ArrowLeft") {
prevClickHandler();
}
};
- improve box-shadow to get closer to design
- Website - Deva Mari
- Frontend Mentor - @Deva-Mari
- GitHub- @Deva-Mari