Gathering detailed insights and metrics for @storybook/csf
Gathering detailed insights and metrics for @storybook/csf
Gathering detailed insights and metrics for @storybook/csf
Gathering detailed insights and metrics for @storybook/csf
Component Story Format is an open standard for UI component examples based on JavaScript ES6 modules.
npm install @storybook/csf
Typescript
Module System
Node Version
NPM Version
99.4
Supply Chain
91
Quality
91.7
Maintenance
100
Vulnerability
100
License
TypeScript (100%)
Total Downloads
1,711,652,201
Last Day
1,891,250
Last Week
9,770,798
Last Month
43,826,631
Last Year
545,805,290
MIT License
873 Stars
240 Commits
47 Forks
16 Watchers
14 Branches
19 Contributors
Updated on May 10, 2025
Minified
Minified + Gzipped
Latest Version
0.1.13
Package Id
@storybook/csf@0.1.13
Unpacked Size
48.96 kB
Size
12.83 kB
File Count
7
NPM Version
6.14.18
Node Version
14.21.3
Published on
Dec 24, 2024
Cumulative downloads
Total Downloads
Last Day
43.6%
1,891,250
Compared to previous day
Last Week
2.4%
9,770,798
Compared to previous week
Last Month
-11.7%
43,826,631
Compared to previous month
Last Year
6.7%
545,805,290
Compared to previous year
1
21
Components have risen to dominate the UI landscape. There are new component-oriented tools for development, testing, design, and prototyping. These tools engage in the creation and consumption of components and component examples (a.k.a. stories). But each tool has its own proprietary format because a simple, platform-agnostic way to express component examples doesn't yet exist.
A story is a code snippet that renders an example of a component in a specific state. Think about it like a "user story".
It uses the production code shipped to users, making it the most accurate representation of a component example. What's more, stories are expressed in the view layer you use to build your app.
The Component Story Format is an open standard for component examples based on JavaScript ES6 modules. This enables interoperation between development, testing, and design tools.
1export default { title: 'atoms/Button' }; 2export const text = () => <Button>Hello</Button>; 3export const emoji = () => <Button>😀😎👍💯</Button>;
💎 Simple. Writing component "stories" is as easy as exporting ES6 functions using a clean, widely-used format.
🚚 Non-proprietary. CSF doesn't require any vendor-specific libraries. Component stories are easily consumed anywhere ES6 modules live, including your favourite testing tools like Jest and Cypress.
☝️ Declarative. The declarative syntax is isomorphic to higher-level formats like MDX, enabling clean, verifiable transformations.
🔥 Optimized. Component stories don't need any libraries other than your components. And because they're ES6 modules, they're even tree-shakeable!
Tools: Storybook, WebComponents.dev, Components.studio, RedwoodJS, UXPin
Compatible with: Jest, Enzyme, Testing Library, Cypress, Playwright, Mocha, etc.
A minimal set of utility functions for dealing with Component Story Format (CSF).
1yarn add @storybook/csf
See package source for function definitions and types:
storyNameFromExport(key)
- Enhance export name (key
) of the story. Implemented to have parity with startCase.
isExportStory(key, { includeStories, excludeStories })
- Does a named export match CSF inclusion/exclusion options?
parseKind(kind, { rootSeparator, groupSeparator })
- Parse out the component/kind name from a path, using the given separator config.
sanitize(string)
- Remove punctuation and illegal characters from a story ID.
toId(kind, name)
- Generate a storybook ID from a component/kind and story name.
If you have any suggestions, please open an issue or a PR.
All contributions are welcome!
1yarn test
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
Found 7/12 approved changesets -- score normalized to 5
Reason
2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
13 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-05-05
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More