
Security News
PEP 810 Proposes Explicit Lazy Imports for Python 3.15
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
@leafygreen-ui/empty-state
Advanced tools
pnpm add @leafygreen-ui/empty-state
yarn add @leafygreen-ui/empty-state
npm install @leafygreen-ui/empty-state
Output HTML
import { BasicEmptyState } from '@leafygreen-ui/empty-state';
<BasicEmptyState
title="No Results Found"
description="Try adjusting your filters or search terms"
graphic={<SvgOrImgComponent />}
badgeProps={{ variant: 'blue', children: 'Optional' }}
primaryButton={<Button />}
secondaryButton={<Button />}
externalLink={<Link />}
/>
A basic empty state component to be used with MongoDB marketing-approved graphics.
Prop | Type | Description | Default |
---|---|---|---|
graphic | ReactElement | Graphic shown left of text content. The component is designed to be used with MongoDB marketing-approved graphics. | undefined |
badgeProps | BadgeProps | Optional props to conditionally render a badge. | undefined |
title * | string | Heading text. | |
description * | ReactChild | Secondary text. | |
primaryButton | ReactElement | Optional primary call-to-action button. | undefined |
secondaryButton | ReactElement | Optional secondary call-to-action button. This should only exist when a primaryButton exists. | undefined |
A component to highlight a set of features in an empty state.
import { FeaturesEmptyState } from '@leafygreen-ui/empty-state';
<FeaturesEmptyState
title="Explore Your Data"
features={[
{ graphic: <YourIcon1 />, title: "Feature 1", description: "Description of feature 1" },
{ graphic: <YourIcon2 />, title: "Feature 2", description: "Description of feature 2" },
{ graphic: <YourIcon3 />, title: "Feature 3", description: "Description of feature 3" },
]}
primaryButton={<Button />}
secondaryButton={<Button />}
externalLink={<Link />}
/>
Prop | Type | Description | Default |
---|---|---|---|
title * | string | Heading text. | |
features * | Array<Feature> | Array of feature objects (length should be 2 or 3 elements). | |
primaryButton | ReactElement | Optional primary call-to-action button. | undefined |
secondaryButton | ReactElement | Optional secondary call-to-action button. This should only exist when a primaryButton exists. | undefined |
externalLink | ReactElement | Optional link to external page for additional information. | undefined |
Note: The features prop must contain an array of feature objects, where each object should have the icon
, title
, and description
properties.
Property | Type | Description |
---|---|---|
graphic | ReactElement | Icon element to display for the feature. |
title | string | Title of the feature. |
description | ReactChild | Description of the feature. |
FAQs
leafyGreen UI Kit Empty State
The npm package @leafygreen-ui/empty-state receives a total of 1,608 weekly downloads. As such, @leafygreen-ui/empty-state popularity was classified as popular.
We found that @leafygreen-ui/empty-state demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?
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.
Security News
An opt-in lazy import keyword aims to speed up Python startups, especially CLIs, without the ecosystem-wide risks that sank PEP 690.
Security News
Socket CEO Feross Aboukhadijeh discusses the recent npm supply chain attacks on PodRocket, covering novel attack vectors and how developers can protect themselves.
Security News
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.