Skip to main content

Custom Component Library

Prismatic provides a JavaScript library, @prismatic-io/spectral, which provides TypeScript type definitions for use in component development. Spectral's source code is available on GitHub.


To add spectral to a project, run

npm install @prismatic-io/spectral

Import input, component, connection, trigger and action types by adding the following to the top of your component code

import { action, component, connection, input, trigger } from "@prismatic-io/spectral";

Writing Custom components

Please see the writing custom components article to see how to use @prismatic-io/spectral.

If you are new to custom components, consider working through the getting started guide quickstart. Then, see the advanced custom components quickstart to learn how to handle binary data and credentials, and see the unit testing quickstart to learn how to automatically test your custom components.