Skip to content
Look

Shared with the landing page. Theme is the select beside this menu.

Banner

Open .md
Live preview

Loading example…

Banner is part of the Containers set, imported from @jcsoftdev/ui/containers.

import { Banner } from "@jcsoftdev/ui/containers";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/containers/banner.

<Banner tone="info" icon={<Info className="size-4" />}>
Hoy la barbería abre una hora más tarde, a las 10:00.
</Banner>
Prop Type Default Description
tone "success" | "warning" | "danger" | "info" "info"
appearance "outline" | "soft" "soft" soft (default) tints the whole banner; outline keeps the surface and tints only the border.
title ReactNode Bold first line above the content.
icon ReactNode Decorative icon on the left; marked aria-hidden. Defaults to a glyph for the tone; null hides it.
action ReactNode Actions on the right, e.g. a retry button.
classNames Partial<Record<BannerPart, string>> Per-part classes merged with cn; consumer classes win. className still targets the root and is merged last.

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/containers/banner/banner.tsx