Header Padding for Card

I am working on web component design and here are different type of headers for the card design. We want to create a single card component but there are many variations of the header from each project. One of the major is I am dealing with that I have two header with different alignment and padding. The first header has a generic title bar center-aligned and 16px top and bottom padding and the second header has a tab menu as title and it is aligned to the bottom with 16px padding on the top only. Is this possible to use a single layout to achieve different header styles? We tried configuring the tab menu by removing the bottom padding but it was not working.

Header with generic title

Header with Tab menu