shadimage
kapwa
blockbannerssource: ok · hit

Banners Section

A section showcasing banner and call-to-action components for community engagement.

npx shadcn add "https://kapwa-two.vercel.app/r/banners.json"
free

Where it goes

ctabanner

Tags auto-generated by rules on 9/24/2026 — empty means no evidence, not lack of support.

Dependencies

Bundle weight · light

Registry dependencies

card

Files1 · source cached 10/14/2026, 10:59:58 PM

src/lib/demo/blocks/sections/banners/index.tsx
import React from 'react';
import { Card, CardHeader, CardContent } from '@kapwa/card';
import { StripBanner } from '@kapwa/strip-banner';
import { CivicTechBanner } from '@kapwa/civic-tech-banner';

type StripBannerItem = {
  id: number;
  emoji: string;
  mainText: string;
  subText: string;
  primaryButton: {
    text: string;
    className?: string;
    href: string;
  };
  secondaryLink: {
    text: string;
    className?: string;
    href: string;
  };
};

type FullBannerItem = {
  id: number;
  title: string;
  highlightedWord: string;
  description: string;
  highlightedPhrase: string;
  primaryButton: {
    text: string;
    className?: string;
    href: string;
  };
  secondaryButton: {
    text: string;
    className?: string;
    href: string;
  };
};

type BannersSectionProps = {
  headerTitle: string;
  headerSubtitle?: string;
  stripBannerTitle?: string;
  stripBanner?: StripBannerItem;
  fullBannerTitle?: string;
  fullBanner?: FullBannerItem;
};

const BannersSection: React.FC<BannersSectionProps> = ({
  headerTitle,
  headerSubtitle,
  stripBannerTitle = 'Strip Banner',
  stripBanner,
  fullBannerTitle = 'Full CivicTech Banner',
  fullBanner,
}: BannersSectionProps) => {
  return (
    <Card className='mb-2'>
      <CardHeader>
        <h2 className='text-2xl font-semibold'>{headerTitle}</h2>
        {headerSubtitle && <p className='text-gray-800'>{headerSubtitle}</p>}
      </CardHeader>
      <CardContent>
        <div className='space-y-8'>
          {/* Strip Banner */}
          {stripBanner && (
            <StripBanner
              stripBannerTitle={stripBannerTitle}
              stripBanner={stripBanner}
            />
          )}

          {/* Full Banner */}
          {fullBanner && (
            <CivicTechBanner
              fullBannerTitle={fullBannerTitle}
              fullBanner={fullBanner}
            />
          )}
        </div>
      </CardContent>
    </Card>
  );
};

export { BannersSection };
export type { StripBannerItem, FullBannerItem, BannersSectionProps };

More from kapwa

Browse all components in this library →