Socket
Book a DemoInstallSign in
Socket

@leafygreen-ui/marketing-modal

Package Overview
Dependencies
Maintainers
6
Versions
90
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/marketing-modal

leafyGreen UI Kit Marketing Modal

8.0.0
latest
Source
npmnpm
Version published
Weekly downloads
39K
-16.72%
Maintainers
6
Weekly downloads
 
Created
Source

Marketing Modal

npm (scoped)

View on MongoDB.design

Installation

PNPM

pnpm add @leafygreen-ui/marketing-modal

Yarn

yarn add @leafygreen-ui/marketing-modal

NPM

npm install @leafygreen-ui/marketing-modal

Example

import MarketingModal from '@leafygreen-ui/marketing-modal';

function Example() {
  const [open, setOpen] = useState(false);

  return (
    <>
      <button onClick={() => setOpen(!open)}>Open Modal</button>
      <MarketingModal
        open={open}
        buttonProps={{
          children: 'Get started',
          onClick: () => setOpen(false),
        }}
        onLinkClick={() => setOpen(false)}
        onClose={() => setOpen(false)}
        title="Introducing New Feature!"
        graphic={
          <img alt="" src="examples/DataLake.png" width={275} height={220} />
        }
        graphicStyle={ImageStyle.Center}
        linkText="Cancel"
      >
        This is some description text, and it is extra long so it fills up this
        modal. Another thing about the modals here.
      </MarketingModal>
    </>
  );
}

Properties

PropTypeDescriptionDefault
openbooleanDetermines open state of Modal componentfalse
onLinkClickfunctionCallback that fires when the secondary link is clicked. This can be used to set the modal to be closed.() => {}
onClosefunctionCallback that fires when the cancel button, x button, or backdrop is clicked. This can be used to set the modal to be closed.() => {}
titleReactNodeTitle text to display above the main content text.
graphicReact.ReactElementElement to be used as the main graphic of the modal.
graphicStyle'center', 'fill'Determines how the main graphic should be displayed in the modal.'center'
childrennodeChildren that will be rendered inside <MarketingModal /> component.
linkTextstringText content of the alternate action link.
classNamestringStyle to be applied to the container's root node.
darkModebooleanDetermines if the component will appear in dark mode.false
closeIconColor'default', 'dark', 'light'Determines the color of the close icon.'default'
showBlobbooleanDetermines if the blob illustration should appear in the background of the modal. Currently will only work if darkMode is set to false.false
blobPosition'top left', 'top right', 'bottom right'Determines the position of the blob if showBlob is set to true.top left
disclaimerReact.ReactElementDisclaimer text to be rendered under the primary action button.
buttonPropsButtonPropsThe primary button. An object that accepts all Button props except for the variant prop.

FAQs

Package last updated on 19 Aug 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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.