Banner

PreviousNext

A contextual message that displays persistent information at the top of the page or section, typically spanning the full width.

Component banner-demo not found in registry.

Installation

pnpm dlx shadcn@latest add banner

Usage

import { Info, X } from "lucide-react"
 
import * as Banner from "@/components/ui/banner"
 
export default function BannerDemo() {
  return (
    <Banner.Root>
      <Banner.Content>
        <Banner.Icon>
          <Info />
        </Banner.Icon>
        <span>Insert your alert title here!</span>
      </Banner.Content>
      <Banner.CloseButton>
        <X />
      </Banner.CloseButton>
    </Banner.Root>
  )
}

Examples

Variants

Component banner-variants not found in registry.

Error

Component banner-error not found in registry.

Warning

Component banner-warning not found in registry.

Success

Component banner-success not found in registry.

Information

Component banner-information not found in registry.