Skip to content

Banner

The banner component

Importing

ts
import "@tapsioss/web-components/banner";
ts
import { Banner } from "@tapsioss/react-components/Banner";

Component Usage

html
<tapsi-banner></tapsi-banner>
tsx
<Banner />

Properties

NameDescriptionTypeDefault Value
headingThe heading text to display in the banner.string-
descriptionThe description text to display in the banner.string-
imageThe URL of the background image to display in the banner.string-
variantThe variant style of the banner."default" | "hero"-
background-colorThe background color of the banner.string-
text-colorThe text color of the banner.string-

Slots

NameDescription
-The default slot to render extra elements when variant is hero.
actionThe slot for action element.

TIP

You can use slot names as variables:

ts
import { Slots } from "@tapsioss/web-components/banner";

console.log(Slots.DEFAULT); // ""
console.log(Slots.ACTION); // "action"
ts
import { BannerSlots } from "@tapsioss/react-components";

console.log(BannerSlots.DEFAULT); // ""
console.log(BannerSlots.ACTION); // "action"