Chanterelle
- Scientific Name: Cantharellus cibarius
- Region: Found in Europe, North America, and Asia, usually in hardwood forests.
- Fact: Chanterelles have a fruity smell, often compared to apricots!
I am using two demos from codepen, The first one is by Chris Bolson he made a cool slider card showing differen't butterflies of the world. The second is by Anya Melnyk and is a simple fireflies animation.
Fireflies at Night - by Anya Melnyk
Fireflies at Night Animation was created on Junuary 23, 2018
Butterflies was created on April 21, 2025
The Butterflies codepen is a slider card, when clicking on the arrows a new butterfly spins in and the text is updated with said butterflies information. With the fireflies it is an animation of glowing dots that float around the screen.
This rotating card spinner transforms simple content into an engaging visual. Instead of overwhelming users with walls of text, it invites them to explore one concept at a time in an interactive way. The subtle animations and ambient effects create a sense of atmosphere, making the information feel more alive and memorable. I think a card like this would be ideal for storytelling, education, portfolios, product showcases, and anywhere you want to combine movement, curiosity, and discovery into the user experience.
This project combines modern CSS, animations, and interactive elements to create an immersive card spinner experience. Here's a breakdown of some key parts
The radio buttons determine which mushroom card is active. Switching them triggers CSS magic to rotate the circle and update the card content.
<input type="radio" name="card" id="card-1" checked>
<input type="radio" name="card" id="card-2">
<input type="radio" name="card" id="card-3">
<input type="radio" name="card" id="card-4">
<input type="radio" name="card" id="card-5">
<input type="radio" name="card" id="card-6">
<input type="radio" name="card" id="card-7">
<input type="radio" name="card" id="card-8">
The :has()
selector checks which radio is active and updates the rotation of the circle
based on a CSS variable.
&:has(#card-1:checked) {
--target: 1;
--opacity-card-1: 1;
}
&:has(#card-2:checked) {
--target: 2;
--opacity-card-2: 2;
}
&:has(#card-3:checked) {
--target: 3;
--opacity-card-3: 3;
}
&:has(#card-4:checked) {
--target: 4;
--opacity-card-4: 4;
}
&:has(#card-5:checked) {
--target: 5;
--opacity-card-5: 5;
}
&:has(#card-6:checked) {
--target: 6;
--opacity-card-6: 6;
}
&:has(#card-7:checked) {
--target: 7;
--opacity-card-7: 7;
}
&:has(#card-8:checked) {
--target: 8;
--opacity-card-8: 8;
}
This loop spawns multiple glowing fireflies randomly floating in the background.
for (let i = 0; i < 75; i++) {
createFirefly();
}
Each time you switch cards, a little burst of fireflies pops outward directly above the heading with a class of .card-title
function createFireflyBurst(x, y) {
for (let i = 0; i < 50; i++) {
const burst = document.createElement("div");
burst.classList.add("firefly");
burst.style.left = x + "px";
burst.style.top = y + "px";
fireflyContainer.appendChild(burst);
gsap.to(burst, {
x: `+=${(Math.random() - 0.5) * 400}`,
y: `+=${(Math.random() - 0.5) * 400}`,
opacity: 0,
scale: Math.random() * 2,
duration: 4,
ease: "power2.out",
onComplete: () => burst.remove(),
});
}
}
const cardInputs = document.querySelectorAll('input[name="card"]');
cardInputs.forEach((input) => {
input.addEventListener("change", () => {
const title = document.querySelector(".card-title");
const rect = title.getBoundingClientRect();
const centerX = rect.left + rect.width / 2;
const centerY = rect.top + window.scrollY - 30;
createFireflyBurst(centerX, centerY);
});
});