Socket
Book a DemoInstallSign in
Socket

@leafygreen-ui/banner

Package Overview
Dependencies
Maintainers
6
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/banner

leafyGreen UI Kit Banner

Source
npmnpm
Version
9.0.13
Version published
Weekly downloads
46K
-19.16%
Maintainers
6
Weekly downloads
 
Created
Source

Banner

npm (scoped)

View on MongoDB.design

Installation

Yarn

yarn add @leafygreen-ui/banner

NPM

npm install @leafygreen-ui/banner

Example

<Banner>This is the banner content</Banner>

Output HTML

<div role="alert" class="leafygreen-ui-zvv1x8">
  <svg
    width="16"
    height="16"
    role="img"
    viewBox="0 0 16 16"
    class="leafygreen-ui-1e46tsl"
  >
    <title>Edit Icon</title>
    <path
      d="M11.352 6.648l-2-2L11 3l2 2-1.648 1.648zM6 12l-3 1 1-3 4.648-4.648 2 2L6 12z"
      fill="currentColor"
      fill-rule="evenodd"
    />
  </svg>
  <span class="leafygreen-ui-1kr3ls8">This is the banner content.</span>
</div>

Properties

PropTypeDescriptionDefault
variant'info', 'warning', 'danger', 'success'Sets the variant for the Banner'info'
dismissiblebooleanDetermines whether or not the Banner is dismissiblefalse
onCloseReact.MouseEventHandlerCallback fired when dismiss button is clicked() => {}
imageReact.ReactElementIllustration that will replace default Icon when the prop is supplied
baseFontSize13, 16Determines font-size for body copy in Callout component13
darkModebooleanDetermines if the component renders in dark themefalse
...native div attributesAny other props will be spread on the root div element

FAQs

Package last updated on 19 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts