Skip to content

Make it look like your app

The ready-made screens are brand-neutral: a quiet green, the platform typeface, a plain card for every document type. WalletBranding changes all of it. Set it once, where you create the SDK object, before the first screen shows; every SDK screen (cards, consent, presenting, results) then uses the same name, colours and card art, on every sharing path: in person, a website’s link or QR, and the phone’s ID sheet on Android. Your app’s own Material theme does not change the SDK’s colours. (The iOS 26 ID sheet runs in your provider extension: pass the same colour as WalletDocumentProviderView(…, accentColor:).)

Branding.kt
package samples
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.TextStyle
import androidx.compose.ui.text.font.FontFamily
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.sp
import com.wallet.model.DocTypes
import com.wallet.ui.CardFace
import com.wallet.ui.CardInk
import com.wallet.ui.CardTextWeight
import com.wallet.ui.WalletBranding
/** Make the wallet screens look like your app. Set once, at app start, before the first SDK screen shows. */
object Branding {
fun apply() {
WalletBranding.appName = "My City" // the title of the consent sheet, above the verifier's name
WalletBranding.primaryColor = Color(0xFF4361DF) // buttons, icons, progress
// The colour behind the wallet screens: your page colour, so your bars and the wallet meet without a seam.
WalletBranding.backgroundColor = Color(0xFFF7F6FA)
WalletBranding.fontFamily = FontFamily.SansSerif // your typeface: FontFamily(Font(R.font.my_regular), …)
WalletBranding.credentialTypes = listOf(EmiratesIdType.type)
// One face per document type: the built-in driving licence and your own type.
WalletBranding.cardFaces = mapOf(
DocTypes.MDL to MyLicenceCardFace,
EmiratesIdType.type.docType to MyIdCardFace,
)
WalletBranding.install()
}
/** A card face, drawn from the signed data on a 1024 × 646 canvas (ID-1 ratio). */
val MyLicenceCardFace = CardFace { card ->
background(Color(0xFFEFF3F9), Color(0xFFDCE6F3))
text("DRIVING LICENCE", 46f, 46f, TextStyle(color = CardInk, fontSize = 30.sp, fontWeight = FontWeight.Bold))
card.portrait?.let { image(it, 46f, 120f, 258f, 330f) }
field(344f, 130f, "LICENCE NO.", card.fields["document_number"], valueSize = 34.sp)
field(344f, 224f, "NAME", card.name)
field(344f, 318f, "DATE OF BIRTH", card.date("birth_date"))
field(680f, 318f, "EXPIRES", card.date("expiry_date"))
}
/** A second face, for a document type of your own: an ID card. The same helpers with plain values (ARGB colours, sizes, weights). */
val MyIdCardFace = CardFace { card ->
val ink = 0xFF1B1F3B
radialBackground(center = 0xFFEBD9EE, edge = 0xFFC9DEF2) // a national ID card's security print
text("RESIDENT IDENTITY CARD", 44f, 36f, size = 30f, weight = CardTextWeight.Bold, color = ink, letterSpacing = 0.5f)
card.portrait?.let { image(it, 64f, 150f, 246f, 330f, cornerRadius = 14f) }
textCenter("ID NUMBER", 640f, 150f, size = 18f, weight = CardTextWeight.Medium, color = ink)
textCenter(card.fields["person_id"] ?: "—", 640f, 180f, size = 30f, weight = CardTextWeight.Bold, color = ink, letterSpacing = 1f)
field(356f, 270f, "NAME", card.name, valueSize = 26f, valueColor = ink, labelColor = ink)
field(356f, 370f, "DATE OF BIRTH", card.date("birth_date"), valueSize = 24f, valueColor = ink, labelColor = ink)
field(700f, 370f, "EXPIRES", card.date("expiry_date"), valueSize = 24f, valueColor = ink, labelColor = ink)
// A faded grey copy of the photo, as printed on many ID cards.
card.portrait?.let { image(it, 860f, 450f, 110f, 148f, cornerRadius = 55f, alpha = 0.18f, grayscale = true) }
}
}
WalletBranding What it changes Default
appName the wallet’s name: the title of the consent sheet, above the verifier’s name "Wallet"
primaryColor (Swift: setPrimaryColor(argb:)) buttons, icons, progress the SDK’s green
backgroundColor (Swift: setBackgroundColor(argb:)) the background behind the wallet screens. Set it to your page colour when the wallet sits inside your own screens, so your bars and the wallet meet without a seam a light grey
fonts (Kotlin also: fontFamily) optional: the typeface of every screen and of card-face text: one BrandFont per weight, or a Compose font family the platform typeface
cardFaces a card design per document type, drawn from the signed data (below) the neutral card
credentialTypes your own document types, so values render with the right labels and formats the driving licence only

theme is the SDK’s Material theme in these colours and typeface: wrap your own screens in it and they match. typography is the type scale alone, for apps with their own MaterialTheme.

A typeface of your own is optional. The demo apps keep the phone’s standard font and set only their name, colours and card faces. A card face can still set its own font on any text (a TextStyle with a fontFamily); text without one uses your typeface, or the platform’s.

A card face is a drawing function per document type on a 1024 × 646 canvas (the ID-1 card ratio). It gets the credential’s values already rendered as text (fields), its dates (date("birth_date") as dd/MM/yyyy), the holder’s name and the portrait, and draws with background, radialBackground, text, textCenter, textRight, field, image and rect, or anything else through the raw drawing scope. Colours are ARGB values, text sizes are card pixels and weights are CardTextWeight (Regular, Medium, SemiBold, Bold); the default ink and label colours are CardColors.ink and CardColors.muted. Kotlin can also pass Compose Colors and TextStyles, as MyLicenceCardFace does. The drawn card is what the wallet, the consent sheet and the iOS Digital Credentials sheet show.

Any document type can have a face: the sample registers one for the built-in driving licence and one for its own Emirates ID type (MyIdCardFace), keyed by the type’s docType. Document types without a face get the neutral card. Images (image) take PNG or JPEG bytes, so a logo or emblem from your app’s resources draws the same way as the portrait.

The Emirates ID card in the demo wallet
A card face drawn by the demo wallet. Demo data is fictional.

Next: Go live.