TypeScript icon, indicating that this package has built-in type declarations

    1.0.5 • Public • Published


    github action status npm version code style: prettier Contributor Covenant

    angular-value-flash will display a flashed value on screen based on some value change. This pattern is extremely common in financial applications, and at Lab49, we're focused on the finance industry.

    Incorporate this component into your application and pass along a number. As that number changes, this component will briefly flash a color, letting the user know the number has changed. By default, this component will flash green when the value changes up, or red when the value changes down.

    Not only are these colors configurable, but the properties of the flash itself and the formatting of the value are configurable as well.

    Furthermore, this component doesn't come with any styles, but does provide plenty of hooks to add your own styles. Even though flash color and transition properties are configurable as props, you can still use the generated classnames (which are also configurable) to add your own unique styles.

    This component is perfect for:

    • Trading platforms
    • Analytics dashboards
    • Monitoring dashboards


    • Small, simple, configurable, performant
    • Maintained by a team of finance industry professionals
    • Includes linting, prettier & unit test validations

    Table of contents

    Compodoc Documentation

    Full documentation, generated using Compodoc:


    Hosted Storybook demo:

    You can also run the demo locally. To get started:

    git clone
    npm install
    npm run storybook
    ⇡ Top


    npm install angular-value-flash
    ⇡ Top


    // Include in a module:
    import { ValueFlashModule } from 'angular-value-flash';
      imports: [
    <!-- Use in a component template: -->

    There are a number of classnames you can use to add your own styles. This Storybook example demonstrates a potential custom styling. Find the story source code here and the SCSS used here. Below is a list of all the available classnames, with the default .rvf_Flash prefix.

    Note that due to view encapsulation, these styles will need to be included in global CSS/SCSS files, so be sure to properly scope the styles using wrapper div elements or by using specific prefixes as input to the value-flash component.

    Class Description
    .rvf_Flash Root DOM node
    .rvf_Flash__value Rendered value, direct (and only) child of the root node.
    .rvf_Flash--flashing Applied only when the component is in the flashing state.
    .rvf_Flash--flashing-up Applied when flashing 'up'.
    .rvf_Flash--flashing-down Applied when flashing 'down'.
    .rvf_Flash--positive Applied when the value is positive.
    .rvf_Flash--negative Applied when the value is negative.
    ⇡ Top




    Selector: value-flash

    Exported As: ValueFlashComponent


    Name Default Description
    @Input() downColor: string 'red' Color value when the component flashes 'down'.
    @Input() formatter: FormatterType 'default' Value display formatter type. Options are: 'currency', 'percentage', 'number', 'default'. See formatter definititions here.
    @Input() formatterFn: Formatter Custom formatter to use. Overrides formatter input.
    @Input() stylePrefix: string 'rvf_Flash' Class for root DOM node and prefix for flashing states, positive/negative states, and value node.
    @Input() timeout: number 200 Amount of time the flashed state is visible for, in milliseconds.
    @Input() transition: string Custom CSS transition property.
    @Input() transitionLength: number 100 Transition length, in milliseconds.
    @Input() upColor: string 'green' Color value when the component flashes 'up'.
    @Input() value: number 0 Value to display.


    MIT @ Lab49

    ⇡ Top


    These items are very high level right now. Further discussion and proper roadmap planning will happen in GitHub issues and projects.

    • [ ] Finalize CI process for publishing.
    • [ ] Add a contributing guide.
    • [ ] Create a feature roadmap.
    • [ ] Publish code coverage to
    • [ ] Finanlize (logo, coverage info).
    • [ ] Expand Storybook demos.
    • [ ] Expand unit tests.

    Sponsored by Lab49


    npm i angular-value-flash

    DownloadsWeekly Downloads






    Unpacked Size

    76.4 kB

    Total Files


    Last publish


    • brianmcallister
    • troy-prince-lab49