ng-prism
A component showcase for modern Angular, without story files.
You add one decorator to your component. ng-prism picks it up at build time and generates live controls, code snippets and docs from it.

Live demo · Documentation
Watch the one-minute tour
Same button, two approaches
| Storybook | ng-prism |
|---|
// button.stories.ts (separate file)
import type { Meta, StoryObj } from '@storybook/angular';
import { ButtonComponent } from './button.component';
const meta: Meta<ButtonComponent> = {
title: 'Atoms/Button',
component: ButtonComponent,
argTypes: {
variant: {
control: 'select',
options: ['primary', 'secondary', 'danger']
}
}
};
export default meta;
type Story = StoryObj<ButtonComponent>;
export const Primary: Story = {
args: { variant: 'primary', label: 'Click me' }
};
export const Danger: Story = {
args: { variant: 'danger', disabled: true }
};
|
// button.component.ts (on the component itself)
@Showcase<ButtonComponent>({
title: 'Button',
category: 'Atoms',
variants: [
{ name: 'Primary',
inputs: { variant: 'primary', label: 'Click me' } },
{ name: 'Danger',
inputs: { variant: 'danger', disabled: true } }
]
})
@Component({ /* ... */ })
export class ButtonComponent { /* ... */ }
The controls come from your input() types.
You don't need argTypes or an extra file, and the variants are type-checked.
|
Does @Showcase end up in my production bundle?
Not after you strip it. The decorator does nothing at runtime, but the built library still calls it and imports @ng-prism/core; ng add registers a strip-showcase script that removes both after the build (ng build my-lib && npm run strip-showcase), so @ng-prism/core stays a devDependency.
The details, including Nx targets and the transformer API, are in Publishing Libraries.
Why not Storybook?
Storybook is a great tool. ng-prism deliberately covers less. It only supports Angular and tries to work the way Angular does.
| Storybook | ng-prism |
|---|
| Frameworks | React, Vue, Angular and more | Angular only |
| Where variants live | Separate *.stories.ts | On the component |
| Controls | Configured via argTypes / Compodoc | Inferred from input() signals |
| Services and pipes | Hand-written MDX page per service or pipe, members table via Compodoc | @Showcase on the service or pipe: API page from its JSDoc, with usage snippet, setup and linked types |
| Visual regression | Chromatic (paid SaaS) or community addons | Official plugin, works with your own screenshot runner, no SaaS |
| Accessibility | @storybook/addon-a11y | Built in (axe-core) |
| Design handoff | Design addons | Official Figma plugin, with an opt-in pixel diff against the design |
| Interaction tests | Yes (play functions) | No |