Candid.Appearance struct lets you tailor the look of every Candid screen to match your app’s visual identity. Pass an Appearance value to Candid.Configuration(appearance:) when you call Candid.configure(_:) at launch. You can change the brand color, the typeface, and where the feedback widget appears independently. All of them default to values that work out of the box if you prefer not to customize them.
Primary color
String
default:"#35C884"
A hex color string (e.g.
"#35C884") that the SDK uses as its brand color. The SDK derives all interactive UI elements (buttons, progress indicators, and highlights) from this single value. Defaults to Candid green (#35C884).#:
Font
FontChoice
default:".system()"
The typeface applied to all text in the Candid UI. Choose from three options: the system font with a design variant, a named font registered in your app bundle, or a fully custom
FontProvider implementation.System font with a design variant
Use.system(_:) to keep the system font while applying a Candid.SystemFontDesign variant. The available designs are .default, .rounded, .serif, and .monospaced.
Named custom font
Use.custom(name:) to apply a font that is already registered in your app bundle (listed in your Info.plist under UIAppFonts). Pass the PostScript name of the font exactly as it appears in the bundle.
The Candid SDK uses the name you provide for all weights and sizes. Ensure that you register all required weight variants in your
Info.plist so that bold and light styles resolve correctly.Custom FontProvider
For complete control, for example to integrate a custom font loader or a design-system token, conform a type toCandid.FontProvider and pass it to .custom(_:).
font(size:weight:) every time it needs to render text, forwarding the exact point size and weight it requires. Return any SwiftUI Font you like.
Here is a complete example that loads a font from an external design-system package:
Candid.Appearance:
Widget position
During a study, the minimized microphone widget floats above your app so participants can reopen the current question at any time. Two options control where it first appears, so you can keep it clear of tab bars, banners, or floating action buttons.WidgetPosition
default:".bottomRight"
The screen corner where the minimized microphone widget first appears. Available presets:
.topLeft, .topRight, .bottomLeft, and .bottomRight. Left corners mirror the minimized layout: the microphone sits on the left with the status prompt on its right. Defaults to .bottomRight.CGFloat
default:"172"
The vertical padding in points between the widget and the safe-area edge of the chosen corner: top padding for top corners, bottom padding for bottom corners. Defaults to
172.These options only set the widget’s initial position. Participants can drag the widget anywhere vertically afterwards, and it always stays clamped inside the safe area. The horizontal margin is fixed and cannot be customized.
Complete example
The snippet below shows a fullAppearance configuration combining a custom color, a FontProvider, and a custom widget placement: