Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/insanusmokrassar/jsuikitkbindings
Kotlin/JS bindings and tools for JS UIKit library
https://github.com/insanusmokrassar/jsuikitkbindings
compose-library compose-web kotlin kotlin-js uikit uikit3
Last synced: 3 months ago
JSON representation
Kotlin/JS bindings and tools for JS UIKit library
- Host: GitHub
- URL: https://github.com/insanusmokrassar/jsuikitkbindings
- Owner: InsanusMokrassar
- License: mit
- Created: 2021-12-22T07:51:16.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-17T08:18:29.000Z (10 months ago)
- Last Synced: 2024-03-17T09:26:06.623Z (10 months ago)
- Topics: compose-library, compose-web, kotlin, kotlin-js, uikit, uikit3
- Language: Kotlin
- Homepage:
- Size: 374 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# JSUIKit Kotlin
Hello :) This library is a wrapper for JavaScript/CSS [UIKit](https://getuikit.com) framework. It uses the same
structure as in [UIKit Docs](https://getuikit.com/docs/introduction) and in most cases you may use it.The main target of this wrapper is a [JetBrains Compose JS](https://github.com/JetBrains/compose-jb) and will be useful
for you in case you are using it too.## How to include
Last version: [![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.inmo/kjsuikit/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.inmo/kjsuikit)
```groovy
implementation "dev.inmo:kjsuikit:$kjsuikit_version"
```**THIS LIBRARY DO NOT ADD ANY JS OR CSS**. So, you must download and include UIKit js/css by yourself. See
[UIKit installation instructions](https://getuikit.com/docs/installation)## How to use
In this library there are two main entities:
* Builder functions - buttons, spinners, icons, grids, etc.
* Modifiers - `UIKitAlign`, `UIKitAnimation`, etc.For example, if you want to add table in your html, you will use next code:
```kotlin
DefaultTable(
listOf("Heading 1", "Heading 2", "Heading 3"),
data, // SnapshotStateList
UIKitTable.Divider // modifier, add dividers
) { i, item -> // i - number of heading, item - item from data; composable callback
when (i) {
0 -> Text(item.toString())
1 -> Text("data 2")
2 -> Text("data 3")
}
}
```