Preheat your oven to 350°F (175°C).
Grease a 9x9 inch baking pan or line it with parchment paper.
In a large mixing bowl, beat the butter and sugar together until light and fluffy, about 2-3 minutes.
Mix in the egg and vanilla, blending until fully incorporated.
In another bowl, whisk together the flour and baking powder, then gradually add to the butter mixture.
Fold in the coconut and slivered almonds until evenly distributed.
Spoon the batter into the prepared baking pan, spreading it evenly.
Spoon the apricot preserves over the top of the batter and swirl slightly.
Bake for 25-30 minutes or until golden brown and a toothpick comes out clean.
Let cool for 10 minutes before transferring to a wire rack. Cut into squares and sprinkle with almonds if desired.