Why I Built ng-prism — An Angular-Native Storybook Alternative With Zero Story Files

typescript dev.to

ng-prism

Lightweight, Angular-native component showcase tool. Annotate components with @Showcase — no separate story files needed.

Live Demo · Documentation

Features

  • Zero-config discovery — TypeScript Compiler API scans your library at build time
  • Signal-native — works with input() / output() signals
  • Directive support — showcase directives with configurable host elements
  • Plugin architecture — JSDoc, A11y, Figma, Performance, Box Model, Coverage
  • Live Controls — auto-generated input controls with type-aware editors
  • Code Snippets — live-updating Angular template snippets per variant
  • Component Pages — free-form demo pages for complex components
  • Deep-linking — URL state sync for sharing specific component/variant/view
  • Themeable — full CSS custom property system, replaceable UI sections

Quick Start

1. Install

npm install @ng-prism/core
Enter fullscreen mode Exit fullscreen mode

2. Add @Showcase to a component

import { Component, input, output } from '@angular/core';
import { Showcase } from '@ng-prism/core';
@Showcase({
  title: 'Button',
  category: 'Atoms',
  description
Enter fullscreen mode Exit fullscreen mode

Source: dev.to

arrow_back Back to Tutorials