Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@ljcl/storybook-addon-cssprops
Advanced tools
Interact with css custom properties dynamically in the Storybook UI
npm i -D @ljcl/storybook-addon-cssprops
Enable the addon in .storybook/main.js
:
module.exports = {
addons: ["@ljcl/storybook-addon-cssprops"],
};
To use it inside MDX, or when customising the docs page:
import { CssPropsBlock } from "@ljcl/storybook-addon-cssprops";
Include your CSS Custom Properties without the intial --
prefix, the addon will apply and document this automatically.
export default {
title: "Simple Component",
parameters: {
cssprops: {
"css-custom-property-1": {
value: "hsl(120deg 100% 25% / 49%)",
description: "Optional description",
},
}
},
} as Meta;
Controls default to colour, but can be switched to text by adding cssprops.myparam.control: 'text'
.
Disable the picker with cssprops.disable: true
Customise preset colours for the colourpicker with cssprops.presetColors: ['#FFF']
.
Modify the docs page based by following the storybook docs. Including <CssPropsBlock />
where you prefer.
This monorepo uses npm@7 workspaces, run npm i
at the root.
[] Auto detect input type.
[] Look for the args of a defined component when in MDX
[] Configurable per story localstorage.
[] Better specificity when injecting styles (with & without iframes)
[] Functioning reset button.
Portions of this package are sourced from the storybook source code in order to maintain look and feel.
FAQs
Interact with css custom properties dynamically in the Storybook UI
The npm package @ljcl/storybook-addon-cssprops receives a total of 4,536 weekly downloads. As such, @ljcl/storybook-addon-cssprops popularity was classified as popular.
We found that @ljcl/storybook-addon-cssprops demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.