TimelineEvent

Type: React component

How to get TimelineEvent?

JavaScript

import { TimelineEvent } from 'fds/components';

An event presented in a Timeline. Renders a date/time or a custom specified label and a point on the timeline in the desired color, based on the "colorName" prop.

Props

  1. children

    (Optional)

    Type: ReactNode

    Default value

  2. colorName

    (Optional)

    Type: String

    The name of the color to use in the component. FDS has implemented a color palette for all of the components implemented in the library.

    When building a custom component, try to use the existing colors as much as possible. Try to find an FDS component which is similar to the component you're building. When using colors this way, you can guarantee your component will use the correct color when the style of the library updates.

    The possible values can be found in the example.

    Related links

    Default value

  3. date

    (Required)

    Type: String | Class

    Renders a date/time label or a custom label next to the point on the timeline.

    When specifying a Date instance, a date/time label will be presented formatted as YYYY (only shown when it's not the current year) DD-MM and HH:MM.

    A custom label can be specified by specifying a string, this will directly output the string value.