Socket
Book a DemoInstallSign in
Socket

@leafygreen-ui/info-sprinkle

Package Overview
Dependencies
Maintainers
6
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leafygreen-ui/info-sprinkle

LeafyGreen UI Kit Info Sprinkle

latest
Source
npmnpm
Version
5.0.6
Version published
Maintainers
6
Created
Source

Info Sprinkle

npm (scoped)

View on MongoDB.design

Installation

PNPM

pnpm add @leafygreen-ui/info-sprinkle

Yarn

yarn add @leafygreen-ui/info-sprinkle

NPM

npm install @leafygreen-ui/info-sprinkle

Example

import { InfoSprinkle } from `@leafygreen-ui/info-sprinkle`;

<InfoSprinkle
  triggerProps={{
    onMouseDown: () => {},
    onMouseOver: () => {},
    'aria-label': 'aria-label',
  }}>
  I'm an info sprinkle
</InfoSprinkle>

Properties

Properties

PropTypeDescriptionDefault
openbooleanControls the component, and determines whether or not the <Tooltip /> will appear open or closed.false
setOpenfunctionIf controlling the component, pass state handling function to setOpen prop. This will keep the consuming application's state in-sync with LeafyGreen's state, while the <Tooltip /> component responds to events such as backdrop clicks and a user pressing the Escape key.(boolean) => boolean
initialOpenbooleanPasses an initial "open" value to an uncontrolled Tooltip.false
shouldClosefunctionCallback that should return a boolean that determines whether or not the <Tooltip /> should close when a user tries to close it.() => true
align'top', 'bottom', 'left', 'right'Determines the preferred alignment of the <Tooltip /> component relative to the element passed to the trigger prop. If no trigger is passed, the Tooltip will be positioned against its nearest parent element.'top'
justify'start', 'middle', 'end'Determines the preferred justification of the <Tooltip /> component (based on the alignment) relative to the element passed to the trigger prop. If no trigger is passed, the Tooltip will be positioned against its nearest parent element.'start'
darkModebooleanDetermines if the <Tooltip /> will appear in dark mode.false
idstringid applied to <Tooltip /> component
classNamestringApplies a className to Tooltip container
childrennodeContent that will be rendered inside of <Tooltip />
enabledbooleanEnables Tooltip to trigger based on the event specified by triggerEvent.true
onClosefunctionCallback that is called when the tooltip is closed internally. E.g. on ESC press, on backdrop click, on blur..() => {}
baseFontSize13 | 16font-size applied to typography elementdefault to value set by LeafyGreen Provider
triggerPropsOmit<ComponentProps<'button'>, 'ref'>Trigger props, excludes ref
...native div attributesAny other props will be spread on the root div element

Note: The ref of this component will be the trigger icon but all props will spread to the internal <Tooltip/> component.

FAQs

Package last updated on 25 Sep 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