![]() |
VOOZH | about |
Timeline is used to display a series of information that needs to be ordered by time (ascending or descending).
Ant Design Library has this component pre-built, and it is very easy to integrate as well. We can use this Timeline component using the following approach easily.
Syntax:<Timeline> <Timeline.Item> Content of the timeline </Timeline.Item> </Timeline>Timeline Property:
Creating React Application and Installing Module:
Step 1: Create a React application using the following command.
npx create-react-app demo
Step 2: After creating your project folder i.e. demo, move to it using the following command.
cd demo
Step 3: After creating the ReactJS application, Install the antd library using the following command.
npm install antd
Example: Now write the following code in filename App.js.
Running the application: Run the application by using the following command.
npm start
Output: Now open your browser and go to http://localhost:3000/, You will see the following output.
👁 ImageReference: https://ant.design/components/timeline/