Replies: 1 comment
-
|
Hi @Mwalthery! I'm Dosu and I’m helping the storybook team. There isn't a built-in Storybook or docs addon setting to automatically show only attributes and hide properties for Lit components using a Custom Elements Manifest (CEM). By default, Storybook merges both attributes and properties from the CEM, which leads to the duplication you're seeing in the docs UI reference. You have a few options to reduce this clutter:
Adjusting the CEM to exclude properties is not recommended unless you know it won't break other tooling. The most maintainable approach is to filter via Storybook's controls or argTypes configuration, or to preprocess the manifest before passing it to Storybook. If you want a code example for a custom extraction function or a manifest wrapper, let me know! To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
Hi everyone,
We’re working on our design system and using a Custom Elements Manifest (CEM) to describe our components. Our components are built with Lit, and when we render them in Storybook, we notice that both attributes and properties are shown, which clutters the interface.
We would like only attributes to appear in Storybook (i.e., hide the duplicate property entries).
Here’s a minimal example of what we're defining in our component as property
Questions:
Is there a way to configure Storybook or the docs addon to show only attributes for Lit components?
Should we adjust our CEM generation instead?
Any guidance, examples, or references would be greatly appreciated!
Thanks in advance 🙏
Additional information
No response
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions