kor TürkçeGitHub

Getting started

Add Kor to a UI5 project and render your first control.

Install the library

Run this in a UI5 application with a UI5 Tooling specification version of 3.0 or later. Use OpenUI5 or SAPUI5 1.108 or later.

npm install kor-ui5

Add Kor under the existing sap.ui5 entry in manifest.json. Keep any dependencies your application already uses. Kor itself depends on sap.ui.core and loads its own stylesheet.

{
  "sap.ui5": {
    "dependencies": {
      "minUI5Version": "1.108.0",
      "libs": { "sap.ui.core": {}, "kor.ui": {} }
    }
  }
}

Render a button

Use the kor.ui namespace in an XML view. Assign a controller name to the view and define the onSave handler in that controller.

<mvc:View xmlns:mvc="sap.ui.core.mvc" xmlns:k="kor.ui" controllerName="example.Main">
  <k:Button kind="primary" text="Save" press=".onSave"/>
</mvc:View>
sap.ui.define(["sap/ui/core/mvc/Controller", "kor/ui/Toast"], (Controller, Toast) =>
  Controller.extend("example.Main", {
    onSave() { Toast.show("Saved"); }
  })
);

Run npx ui5 serve from your application and open its index page. See Button examples and the setup for static hosting.