SAP Home Learn Build Integrate Model Operate Extend with AI ConnectTutorial navigator Knowledge Graph API Devtoberfest Developer Advocates App Space

Manage my Account SAP Devs YouTube ↗ Learnings ↗ Community ↗ Provide Feedback ↗
Logout
โคข Open full site

Create a Card Component

Define your first component using UI5 Web Components for React.

Overview

🎓 beginner 15 min. HTML5BeginnerSAP Fiori

You will learn

  • โœ”How to import components into your application
  • โœ”Learn about the usage of props
  • โœ”How to use event handling
Lukas Harbarth L Lukas Harbarth May 18, 2026
Created by November 29, 2019
Contributors

Prerequisites

Steps

Intro

Integrate the first component into your App. You can find all available components in the Storybook. There you can try out the different components and also take a look at the coding and the available props.


Step 1 Add components to MyApp.tsx
โ€”

First you need to import the components you want to use.

You can check out all available components in the Storybook. Take your time to play around a little, change some props and take a look at the coding.

  1. Start with importing a Card component into your MyApp.tsx file.

    TypeScript
    import { Card } from "@ui5/webcomponents-react";
  2. So, you imported the Card component. Now it’s time to use it. Replace the content of your <div> with a &lt;Card&gt;.

In the Storybook, you can see that Cards can receive different props. For now only add some text as children.

TypeScript
<div>
  <Card>This is the content area of the Card</Card>
</div>

Your webpage should now look like this.

Card01
Card01

And the file like this:

TypeScript
import { Card } from "@ui5/webcomponents-react";

export function MyApp() {
  return (
    <div>
      <Card>This is the content area of the Card</Card>
    </div>
  );
}
Step 2 Add content to the Card component
+
Step 3 Style your component
+
Step 4 Event handling
+

Resources

Discussion

Share feedback on this tutorial or join the conversation in SAP Community.

Submit detailed feedback Discuss in Community
Steps
Step 1 of 4
1. Add components to MyApp.tsx 2. Add content to the Card component 3. Style your component 4. Event handling

Learn more →