Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leafygreen-ui/banner

Package Overview
Dependencies
Maintainers
5
Versions
62
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

  • 8.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
50K
increased by30.34%
Maintainers
5
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 15 Apr 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc