---
title: "Banner"
subtitle: "<Banner> is an in-page notice bar for deprecations and migrations."
---

An in-page notice bar, good for flagging deprecations or migrations at the top of a page. For site-wide announcements, use [`announcement`](../configuration/docs-yml.mdx#announcement-bar) in `docs.yml`.

```mdx
<Banner dismissible variant="subtle">
  This in-page notice can be dismissed, and it stays hidden after a page refresh.
</Banner>
```

<Banner dismissible variant="subtle">
  This in-page notice can be dismissed, and it stays hidden after a page refresh.
</Banner>

<ParamField path="dismissible" type="boolean" default="false">Show a close button; the dismissed state is saved in the browser.</ParamField>
<ParamField path="variant" type="solid | subtle" default="solid">`subtle` uses a light background.</ParamField>
<ParamField path="id" type="string">Key for remembering the dismissed state; defaults to a hash of the content (so it reappears when the content changes).</ParamField>
