Step 1: Preheat and Prepare : Preheat your oven to 350°F (175°C). Line a 12-cup muffin tin with paper liners. Set out all ingredients so they’re at room temperature before starting.
Step 2: Mix Dry Ingredients : In a medium bowl, whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger. Set aside.
Step 3: Mix Wet Ingredients : In a large mixing bowl, whisk together granulated sugar, brown sugar, and oil until well combined. Add eggs and vanilla extract, whisking until the mixture is smooth and slightly thickened.
Step 4: Combine Wet and Dry Ingredients : Add the dry ingredients to the wet mixture, stirring gently until just combined. Fold in the grated carrots, pineapple, and nuts/raisins (if using). Do not overmix; you want the batter to remain light.
Step 5: Fill and Bake : Divide the batter evenly among the cupcake liners (about 2/3 full). Bake for 20–22 minutes, or until a toothpick inserted into the center comes out clean. Let cupcakes cool in the pan for 5 minutes, then transfer to a wire rack to cool completely.
Step 6: Make the Cream Cheese Icing : In a large bowl, beat butter and cream cheese together until creamy and smooth (about 2 minutes). Gradually add powdered sugar, 1 cup at a time, beating on low until incorporated. Add vanilla extract and salt, then increase speed to medium-high and beat until fluffy (about 2 minutes). If the frosting is too soft, refrigerate for 15 minutes before using.
Step 7: Frost and Decorate : Once cupcakes are completely cool, frost them using a spatula or piping bag with a large round or star tip. Optional: Garnish with a sprinkle of chopped nuts, toasted coconut, or a mini carrot decoration made from fondant or candy.