Promote content from live.ft.com


067.1.112 days ago3 years agoMinified + gzip package size for @financial-times/n-eventpromo in KB



Eventpromo is used to promote content from live.ft.com.

This module is used by n-magnet.


This module is compatible with Node 12+ and is distributed on npm.

npm install --save @financial-times/n-eventpromo @financial-times/x-engine

This module also requires x-engine as a peer dependency. The Engine module is used to inject your chosen runtime into the component. Please read the x-engine documentation first if you are consuming x- components for the first time in your application.



With react

import React from 'react';
import { Eventpromo } from '@financial-times/x-eventpromo';

// A == B == C
const a = Eventpromo(props);
const b = <Eventpromo {...props} />;
const c = React.createElement(Eventpromo, props);

All x- components are designed to be compatible with a variety of runtimes, not just React. Check out the x-engine documentation for a list of recommended libraries and frameworks.


If not marked optional, fields require non-empty values.

Property Type Default Notes
dates String Free text, can be either a specific date or a date range
id String Eventpromo id, 32 chars
imageUrl String An image url, will be processed via origami image service
link String Eventpromo url, should include segmentId
location String No set format: "London", "New York", "ExCeL London", etc
strapline String
title String
brand String ft-live One of ft-live, ft-forums, ft-bdp:workshop, ft-bdp:diploma or ft-bdp:masterclass
ctaText String various Allows changing of the ctaText where desired


git clone git@github.com:Financial-Times/n-eventpromo.git
cd n-eventpromo
make install
make build

Linking to an application

This package does not have a demonstration application, so to test we can link to n-magnet repostiory which consumes this.

Complete the installation for n-magnet locally then link n-eventpromo by running:

cd ../n-magnet
npm link ../n-eventpromo
make build && make demo

When making changes after first linking n-eventpromo run:

# in ./n-eventpromo
make build
# in ./n-magnet
make build && make demo

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.