frontend/src/stories/Lemon UI.stories.mdx
import { Meta } from '@storybook/addon-docs'
<Meta title="Lemon UI/Overview" />Lemon UI is a suite of building blocks powering PostHog's frontend. These components are abstract in nature so they can be used in any context, and are made to fit together. In this section you can find helpful samples, along with documentation of available parameters. All the other Storybook sections depend on this one.
Lemon UI has grown as a replacement for Ant Design, from which we've started transitioning away after onboarding our first product designer, Chris. The quality of our UI has been steadily going up since then, but the transition process is not complete yet.
Your awareness is needed for us to transition sucessfully. 💪 Please DO NOT use the following Ant components when building new UI:
Button – instead go for LemonButtonSelect – instead go for LemonSelectInput, Input.Password, Input.Search – instead go for LemonInputInput.TextArea – instead go for LemonTextAreaTable – instead go for LemonTableCheckbox – instead go for LemonCheckboxSpin – instead go for SpinnerAlert – instead go for LemonBannerTypography – just use HTML elementsModal – instead go for LemonModalDivider – instead go for LemonDividerRow – instead go for LemonRow (for standard rows of content) or roll your own display: flex as needed (for general layout)Col – roll your own display: flex as neededTo simplify styling of elements and remove the need for custom CSS as much as possible, we have a range of Utility CSS classes, modelled off of the popular Tailwind. Tailwind itself is something we decided not to include directly at this point in time, but we aim to keep the internal system as close to that of Tailwind as possible to ensure a simple mental model for contributors as well as keeping the door open to migrating to it in the future.
As we are sticking as close to Tailwind as possible - you can use the fantastic TailwindCSS Docs to search for any util you are interested in (press cmd+k to bring up a quick search on their site). There will of course be many functions we haven't incorporated yet but this at least acts as starting point for documentation and a reference for implementation.