CraftD
  • 👋Overview
  • 🛠️Setup
    • 🤖Android
    • 🍎iOS
    • 🔷Flutter
  • 💡How to use
    • 🤖Android
      • Compose
      • View System
    • 🔷Flutter
    • 🍎iOS
  • 🗒️Notes
    • For Developers
    • License
  • 🙏Thanks to the contributors
Powered by GitBook
On this page
  • Features
  • Components that already exist in the library
  • Quick links
  • Get Started

Overview

CraftD: A framework to implement Server-Driven UI quickly and easily to Android / iOS / Flutter / Km

Features

🔗 Compatibility

Tech
Support

View System - Android

✅ Supported

Jetpack Compose - Android

✅ Supported

Widget - Flutter

✅ Supported

SwiftUi - iOS

✅ Supported

Jetpack Compose - Multiplatform

⚒️ In Progress

Components that already exist in the library

Component
Compose
View System
Widget
SwiftUI

Button

X

X

X

-

Text

X

X

X

X

CheckBox

X

-

-

-

Create your custom component( android compose example )

@JsonIgnoreProperties(ignoreUnknown = true)
@Immutable
@Stable
data class CheckBoxProperties(
    @JsonProperty("text") val text: String? = null,
    ... rest of your properties
)

Add your Component json object in Dymanic.json

{
  "key": "CraftDCheckBox",
  "value": {
    ... rest of your properties
  }
}

Create your Component

@Composable
fun CraftDCheckBox(
    checkboxProperties: CheckBoxProperties,
    modifier: Modifier = Modifier,
    onChecked: (Boolean) -> Unit
) {
    ... Rest of your code
}

Create your Component Builder

class CraftDCheckBoxBuilder(
    override val key: String = CraftDComponentKey.CHECK_BOX_COMPONENT.key
) :
    CraftDBuilder {
    @Composable
    override fun craft(model: SimpleProperties, listener: CraftDViewListener) {
        val checkBoxProperties = model.value.convertToVO<CheckBoxProperties>()
        CraftDCheckBox(checkBoxProperties) {
            checkBoxProperties.actionProperties?.let { listener.invoke(it) }
        }
    }
}

More details check our itens

Samples

Credits

A Server Driven UI library for Android.

Quick links

Get Started

We've put together some helpful guides for you to get setup with our product quickly and easily.

NextSetup

Last updated 10 months ago

Inspired by the .

DynamicView
🛠️Setup
💡How to use
Android Compose
Android View System
iOS SwiftUI
Flutter
👋
Page cover image