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
babel-plugin-storybook-csf-title
A Babel plugin to generate titles for Storybook CSF stories at compile time, typically based on the story file's file name.
@storybook/csf-plugin
Enrich CSF files via static analysis
storybook-vue-csf-addon
A Storybook Addon to write Storybook's stories using Vue SFC syntax and automatically convert them to Storybook CSF
@storybook/mdx2-csf
MDXv2 to CSF webpack compiler and loader
Component Story Format is an open standard for UI component examples based on JavaScript ES6 modules.
npm install @storybook/csf
99.4
Supply Chain
90.9
Quality
99.6
Maintenance
100
Vulnerability
100
License
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
843 Stars
227 Commits
47 Forks
16 Watching
10 Branches
16 Contributors
Updated on 26 Nov 2024
TypeScript (100%)
Cumulative downloads
Total Downloads
Last day
-7.8%
2,003,408
Compared to previous day
Last week
1.3%
10,980,956
Compared to previous week
Last month
4%
47,043,469
Compared to previous month
Last year
8.8%
531,280,558
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 9/12 approved changesets -- score normalized to 7
Reason
7 existing vulnerabilities detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
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
Score
Last Scanned on 2024-11-25
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