banner-2
fulldev-ui/banner-2FreeBlock
fulldev/ui publishes no description for this item.
Live preview
live · rendered by the registry
Rendered by fulldev/ui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://ui.full.dev/r/banner-2.jsonSource
1---2import { cn } from "@/lib/utils"3import { Banner, BannerContainer } from "@/components/ui/banner"4import { Button } from "@/components/ui/button"56type Props = {7 class?: string8 title: string9 description: string10 buttons?: {11 label: string12 href: string13 variant?: "default" | "outline" | "secondary" | "ghost"14 }[]15}1617const { class: className, title, description, buttons } = Astro.props18---1920<Banner variant="floating" storageKey="banner-2" class={cn("", className)}>21 <BannerContainer class="gap-4 py-1" showClose={false}>22 <div23 class="flex flex-1 flex-col gap-0.5 lg:flex-row lg:items-center lg:gap-x-4"24 >25 <p class="text-sm font-semibold">{title}</p>26 <p class="text-muted-foreground text-sm">{description}</p>27 </div>28 {29 buttons?.length && (30 <div class="flex shrink-0 items-center gap-2">31 {buttons.map(({ href, label, ...button }, index) => (32 <Button33 as="a"34 href={href}35 size="sm"36 variant={button.variant ?? (index === 0 ? "default" : "outline")}37 {...button}38 >39 {label}40 </Button>41 ))}42 </div>43 )44 }45 </BannerContainer>46</Banner>
What it pulls in
Other registry items
Files it writes
More from fulldev/ui
All 144 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| article-1article-1 | fulldev/ui | Blocks | Free | no deps | |
| article-2article-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-1articles-1 | fulldev/ui | Blocks | Free | no deps | |
| articles-2articles-2 | fulldev/ui | Blocks | Free | no deps | |
| articles-3articles-3 | fulldev/ui | Blocks | Free | no deps | |
| articles-4articles-4 | fulldev/ui | Blocks | Free | no deps | |
| banner-1banner-1 | fulldev/ui | Blocks | Free | no deps | |
| blocks-1blocks-1 | fulldev/ui | Blocks | Free | no deps |
