Skip to content

Banner Component

Display a banner with optional heading, description, and action slot.

Properties

NameTypeDefaultDescription
headingstringundefinedThe heading text to display in the banner.
descriptionstringundefinedThe description text to display in the banner.
imagestringundefinedThe URL of the background image to display in the banner.
full-widthbooleanfalseWhether the banner should take the full width of its container.
variant'default' | 'hero''default'The variant style of the banner.
background-colorstringundefinedThe background color of the banner.
textColorstringundefinedThe text color of the banner.

CSS Parts

NameDescription
bannerThe main banner element.
contentThe content container inside the banner.
actionThe action container inside the banner.
extraThe extra slot container inside the hero variant.

Check this link to learn how to use CSS parts for Banner Component.

CSS Properties

TokenDefaultDescription
--tap-sys-spacing-6-Spacing around the banner content.
--tap-banner-color-surface-Background color of the banner.
--tap-sys-radius-4-Border radius of the banner.
--tap-banner-background-image-Background image of the banner.
--tap-sys-spacing-4-Margin around the banner.
--tap-banner-color-content-Text color of the banner.
--tap-sys-typography-headline-xs-font--tap-sys-font-familyFont family for the heading text.
--tap-sys-typography-headline-xs-height-Line height for the heading text.
--tap-sys-typography-headline-xs-size-Font size for the heading text.
--tap-sys-typography-headline-xs-weight-Font weight for the heading text.
--tap-sys-spacing-3-Margin below the heading text.
--tap-sys-typography-body-xs-font-Font family for the description text.
--tap-sys-typography-body-xs-height-Line height for the description text.
--tap-sys-typography-body-xs-size-Font size for the description text.
--tap-sys-typography-body-xs-weight-Font weight for the description text.
--tap-sys-spacing-5-Margin above the action slot.
--tap-sys-spacing-8-Minimum height of the extra slot in the hero variant.