01 - Preheat oven to 350°F (175°C). Line a 9-by-13-inch baking pan with parchment paper and lightly grease.
02 - In a large bowl, use an electric mixer to cream together unsalted butter and granulated sugar until light and fluffy, about 2 to 3 minutes.
03 - Add eggs one at a time, beating well after each addition. Mix in pure vanilla extract.
04 - In a separate bowl, whisk together all-purpose flour, baking powder, and salt.
05 - Gradually mix dry ingredients into the creamed mixture until just combined. Do not overmix.
06 - Transfer dough into prepared baking pan. Smooth the surface evenly with a spatula.
07 - Bake for 18 to 22 minutes until edges are lightly golden and center is set; avoid overbaking.
08 - Allow cookie bars to cool completely in the pan on a wire rack.
09 - In a medium bowl, beat unsalted butter until creamy. Gradually add powdered sugar. Mix in vanilla extract and heavy cream or milk. Whip on high until frosting is light and fluffy, about 2 minutes.
10 - Divide frosting evenly into three bowls. Leave one portion plain, tint one with red gel food coloring, and one with blue gel food coloring.
11 - Dollop spoonfuls of each color frosting across cooled bars. Gently swirl with an offset spatula for a marbled design or frost in stripes. Immediately top with red, white, and blue sprinkles.
12 - Slice evenly into 24 bars and serve.