@rocapine/react-native-onboarding-ui
Changelog
All notable changes to @rocapine/react-native-onboarding-ui are documented
here.
[Unreleased]
[1.18.0] - 2026-05-06
Added
fontStylerendering onTextElement,ButtonElement,InputElement(top-level), andRadioGroupElement/CheckboxGroupElement(itemFontStyle). Renderers pass the value through to the underlying<Text>/<TextInput>style, alongsidefontFamilyandfontWeight.setVariableButtonaction —ButtonElementhandles a new action variant{ type: "setVariable", name, value, label? }. The handler writes to the ComposableScreen variable map (and syncs the headless variable map) before any subsequent action in the chain runs, so a following"continue"sees the updated value whenresolveNextStepNumberevaluates branch conditions.
Changed
Button/Text/Inputfont weight resolution — switched fromuseResolvedFontFamilytouseResolvedFontStylefrom@rocapine/react-native-onboarding. When the registry matches a concrete weighted variant (e.g.Inter-700),fontWeightis suppressed on the rendered<Text>to avoid synthetic emboldening on top of an already-weighted font file.
Fixed
CarouselElementsizing — wrap the carousel in an innerView flex:1withonLayoutand pass measuredwidth/heighttoreact-native-reanimated-carouselinstead ofDimensions.get("window"). Render is gated until first measurement.OnboardingDataGateerror handling —useQueryerrors are now thrown so a hostErrorBoundarycatches them, instead of silently rendering thefontsFallbackforever.FontLoaderGate— resets registry to a loading sentinel before async registration and falls back to an empty registry on rejection so a fetch failure doesn't strand the gate.
[1.17.1] - 2026-05-04
Fixed
- Runtime font registration via
OnboardingProvider— fonts declared on the onboarding payload now load correctly when the backend returns the variant-array shape ({ family: [{ weight, style, url }, ...] }). Previous versions silently failed withloadSingleFontAsync expected resource of type Assetand bogusweight 8 from [object Object]warnings, leavingfontFamilystrings unmapped to weighted variants. No UI-package API change; fix lives in the headless SDK consumed byFontLoaderGate.
[1.17.0] - 2026-04-30
Changed
- ComposableScreen typography elements use the runtime font registry —
TextElement,ButtonElement, andInputElementnow calluseResolvedFontFamily(fontFamily, fontWeight)from@rocapine/react-native-onboardingto resolve afamily + weightrequest to the runtime-registered font variant. CMS authors continue to setfontFamilyto the family name declared in theOnboarding.fontsmanifest; the SDK picks the right registered variant (e.g.Inter+500→Inter-500) and falls back to the closest registered weight when an exact match is unavailable.
Element Zod schemas are unchanged. No CMS migration required for existing payloads — they keep working with system fonts.
Bumped
- Peer dependency on
@rocapine/react-native-onboardingis now^1.17.0.
[1.16.0] - 2026-04-29
Added
- Button
actionsexecution —ButtonElementnow runs the headlessButtonAction[]chain on press: sequential,awaits async handlers, warns on missing handler, aborts on thrown error,"continue"is terminal. customActionsplumbing —RenderContextexposescustomActionsto every ComposableScreen element.ComposableScreenRendererreads them from the headlessOnboardingProgressContext(set via<OnboardingProvider customActions={...}>).- Re-exports
ButtonAction,CustomButtonAction,CustomActionHandler,CustomActions,ComposableVariableEntryfrom the headless package.
Changed
ComposableVariableEntryis now sourced from the headless package (@rocapine/react-native-onboarding); the UI provider re-exports it. Existing imports fromOnboardingProgressProvidercontinue to work.
[1.15.0] - 2026-04-28
Added
SafeAreaViewUIElement renderer — newSafeAreaViewElementComponentthat delegates toSafeAreaViewfromreact-native-safe-area-context. Forwardsmodeandedges(array or per-edge object) and appliesBaseBoxPropsstyling.
Changed
OnboardingTemplateno longer applies safe-area insets. The template previously readuseSafeAreaInsets()and addedpaddingTop/paddingBottom. Renderers now own safe-area handling:Carousel,Commitment,Loader,MediaContent,Picker,Question, andRatingswrap their content with<SafeAreaView edges={["top", "bottom"]}>. TheComposableScreenrenderer intentionally does not wrap — author safe-area placement using the newSafeAreaViewUIElement so screens can render edge-to-edge backgrounds.- The progress-header offset (40px) remains in
OnboardingTemplateas plain padding, no longer combined with the top inset.
[1.14.0] - 2026-04-28
Added
ZStackUIElement renderer — newZStackElementComponentthat renders children layered on top of each other. Each child is wrapped inposition: "absolute"filling the container, enabling image-with-text-overlay and other depth-compositing patterns. Supports allBaseBoxPropsincludingbackgroundGradientviaGradientBox.
[1.13.1] - 2026-04-28
Added
ZStackUIElement renderer — newZStackElementComponentthat renders children layered on top of each other. Each child is wrapped inposition: "absolute"filling the container, enabling image-with-text-overlay and other depth-compositing patterns. Supports allBaseBoxPropsincludingbackgroundGradientviaGradientBox.
[1.13.0] - 2026-04-28
Added
-
Gradient backgrounds on all
ComposableScreenelements — every element that renders a container (YStack,XStack,Icon,Image,Text,Button,Lottie,Video,RadioGroup,CheckboxGroup,Carousel,DatePicker) now respectsbackgroundGradientfromBaseBoxProps. -
GradientBoxcomponent — internal utility that wrapsexpo-linear-gradient(LinearGradient) when the library is installed, falling back to a plainViewsilently when it is not. All element renderers delegate their outer container toGradientBox. -
expo-linear-gradientoptional peer dependency — install it to enable gradient rendering; omitting it degrades gracefully to a solid background. -
Linear gradient API —
backgroundGradient: { type: "linear", from: GradientEdge, to: GradientEdge, stops: GradientStop[] }.GradientEdgeis one of 8 named positions ("top","bottom","left","right","topLeft","topRight","bottomLeft","bottomRight"). Stops support optional explicitposition(0–1); when all stops declare a position,locationsis passed toLinearGradient.
Fixed
figmaUrltype inComposableScreenstep schema — changed from.nullable()to.nullish()to align with all other page-type schemas and the headless SDK.
[1.12.0] - 2026-04-28
Changed
ComposableScreenelement variable sync — when aComposableScreenelement with avariableName(e.g.Input,RadioGroup,DatePicker,CheckboxGroup) changes its value, the change is now written to both the UI-layercomposableVariablesstore (drives{{interpolation}}within the current screen) and the headlessvariablesstore (OnboardingProgressContext.setVariable). This makes composable element answers available toresolveNextStepNumberbranch conditions on subsequent steps.
[1.11.1] - 2026-04-27
Changed
-
All element renderers updated to apply the full expanded
BaseBoxProps:minWidth,maxWidth,minHeight,maxHeight,flexShrink,flexGrow,backgroundColor,overfloware now wired into every element's style output. -
dim()helper added (shared.ts) — castsnumber | stringwidth/height values to React Native'sDimensionValue, enabling percentage strings (e.g."100%") across all elements. -
StackElementrenderer — appliesflexGrow, all newBaseBoxPropslayout props.width/heightnow support percentage strings. -
TextElementrenderer — appliesflex,flexShrink/flexGrow,alignSelf,width/height(viadim()),minWidth/maxWidth/minHeight/maxHeight,overflow. -
InputElementrenderer — appliesfontFamily,lineHeight,letterSpacing; alsoflex,flexShrink/flexGrow,minWidth/maxWidth/minHeight/maxHeight,overflow. -
ButtonElementrenderer —alignSelfnow uses the complete enum fromBaseBoxProps. -
RiveElementrenderer — prop renamedautoplay→autoPlay(schema-level rename; the underlyingrive-react-nativelibrary still receivesautoplay). -
CarouselElementrenderer —Pagination.Basicnow driven by dot style props:dotColor,activeDotColor,dotWidth,dotHeight,dotsGap,dotsMarginTop. -
IconElement,LottieElement,VideoElementrenderers — applyflex,flexShrink/flexGrow,alignSelf,minWidth/maxWidth/minHeight/maxHeight.
[1.11.0] - 2026-04-24
Added
-
Carouselelement renderer — rendersCarouselUIElements usingreact-native-reanimated-carousel(now a required peer dependency). Each slide is aUIElementsubtree rendered by the same recursive engine asYStack/XStack, giving full layout flexibility per slide. Four modes viacarouselType:"normal"— full-width paged carousel (default)"parallax"— depth-zoom effect using librarymode="parallax""stack"— stacked cards at 75 % window width viamode="horizontal-stack""left-align"— peek effect at 82 % window width withoverflow: "visible"
Pagination uses
Pagination.Basicfrom the library: animated pill dots in themeprimary/neutral.lowcolors, tappable to jump to any slide.autoPlaydefaults tofalse;loopdefaults totrue;showDotsdefaults totrue. Width defaults touseWindowDimensions().width; height defaults to220 px. AllBaseBoxPropsapplied to the outer container.
[1.10.0] - 2026-04-23
Added
DatePickerelement renderer — rendersDatePickerUIElements using@react-native-community/datetimepicker(new optional peer dependency). On mount, initialises the variable fromdefaultValue(or today if omitted) as{ value: ISO string, label: locale-formatted string }. On change, updates the same variable; thelabelis human-readable (e.g."Apr 23, 2026"formode: "date"). SupportsminimumDate,maximumDate,mode(date/time/datetime),display(platform-specific — iOS defaults to"spinner", Android to"default"),textColor,accentColor,locale, and allBaseBoxPropsfor the wrapping container.
[1.9.0] - 2026-04-22
Added
CheckboxGroupelement renderer — rendersCheckboxGroupUIElements as a vertical (default) or horizontal list of tappable checkbox items. Each item shows a square checkbox indicator and a label; tapping toggles the item's value in/out of the selected set. On mount, setsdefaultValuesintocomposableVariables(keyed byvariableName) as{ value: JSON.stringify(string[]), label: string }. Subsequent toggles update the same entry. Supports all per-item style props (itemBackgroundColor,itemSelectedBackgroundColor,itemBorderColor,itemSelectedBorderColor,itemBorderRadius,itemBorderWidth,itemColor,itemSelectedColor,itemFontSize,itemFontWeight,itemFontFamily,itemPadding,itemPaddingHorizontal,itemPaddingVertical),gap,direction, and allBaseBoxPropsfor the group container.
[1.8.1] - 2026-04-22
Added
alignSelfon allBaseBoxPropselements —Input,RadioGroup,Image,Lottie,Rive,Icon, andVideorenderers now passalignSelffrom props to their root style. Accepts"auto" | "flex-start" | "flex-end" | "center" | "stretch" | "baseline".alignSelfonStackElement—YStack/XStackrootViewnow appliesalignSelffrom props.
Fixed
InputElementflattened to bare<TextInput>— removed the wrapping<View>soalignSelf,width,height, and other layout props apply directly to the input rather than a container. All style props previously split between the wrapper and the innerTextInputare now on the singleTextInput.RadioGroupitem text collapse — replacedflex: 1withflexShrink: 1on the label<Text>inside each radio item. Prevents Yoga from collapsing the text when the item is inside anXStack.
[1.8.0] - 2026-04-21
Added
Buttonelement renderer — rendersButtonUIElements as a<TouchableOpacity>. Supports three variants:filled(solid primary background),outlined(transparent background with border), andghost(no background or border). Tapping callsonContinuewhenactionis"continue"or unset; other future action values are no-ops. Supportslabel,variant,backgroundColor,color,fontSize,fontWeight,fontFamily,textAlign,alignSelf, and allBaseBoxProps.RadioGroupelement renderer — rendersRadioGroupUIElements as a vertical (default) or horizontal list of tappable radio items, each with a circular indicator. Reads/writes the selected value viacomposableVariables(keyed byvariableName). On mount, sets thedefaultValueentry including the matching item's human-readablelabel. Supports all per-item style props (itemBackgroundColor,itemSelectedBackgroundColor,itemBorderColor,itemSelectedBorderColor,itemBorderRadius,itemBorderWidth,itemColor,itemSelectedColor,itemFontSize,itemFontWeight,itemFontFamily,itemPadding,itemPaddingHorizontal,itemPaddingVertical) and allBaseBoxPropsfor the group container.- Structured variable entries —
composableVariablesis nowRecord<string, ComposableVariableEntry>whereComposableVariableEntry = { value: string; label?: string }.RadioGroupstores{ value, label }on selection;Inputstores{ value }. Expression interpolation inTextelements resolveslabel ?? value, so{{variableName}}on a radio-backed variable displays the human-readable label (e.g."Monthly") instead of the raw value (e.g."monthly").
Note on semver: The
composableVariablestype changed fromRecord<string, string>toRecord<string, ComposableVariableEntry>. This is a technically breaking change to the context shape, but is published as a minor bump becausecomposableVariablesis an internal context value (not part of the public API contract). Existing consumers that only read the value string viavariables[key]remain unaffected — access.valuefor the same result.
Changed (internal)
ComposableScreenelement components and types split intoelements/subfolder — one file per element.Renderer.tsxreduced from 630 to 58 lines;types.tsfrom 443 to 173 lines. ARenderContextobject replaces the five individual parameters previously threaded throughrenderElement.
[1.7.0] - 2026-04-21
Added
fontFamilysupport onTextelements — theTextrenderer now passesfontFamilyfrom element props directly to the React Native<Text>style. Any font family loaded by the host app (e.g. viaexpo-font) can be applied to a text node by settingfontFamilyin its props.
[1.6.0] - 2026-04-21
Added
Inputelement renderer — rendersInputUIElements as a styled<TextInput>. Supports all text input props (placeholder,placeholderColor,defaultValue,keyboardType,returnKeyType,autoCapitalize,secureTextEntry,maxLength,multiline,numberOfLines,editable) plus typography (color,fontSize,textAlign,padding*) andBaseBoxProps(backgroundColor,borderWidth,borderRadius,borderColor,width,height,opacity,margin*).- Variable context —
OnboardingProgressContextextended withcomposableVariables: Record<string, string>andsetComposableVariable.Inputelements write their value into this shared map on every keystroke (keyed byvariableName). Values survive navigation betweenComposableScreensteps because the context lives above the router. - Expression interpolation for
Textelements — whenmode: "expression",{{variableName}}patterns incontentare replaced with values fromcomposableVariablesat render time. Defaultmode: "plain"is unchanged. OnboardingProgressProviderandOnboardingProgressContextexported from the package's public API so host apps can wrap their root layout with the provider.
Fixed
InputElementComponentno longer subscribes toOnboardingProgressContextdirectly;setComposableVariableis threaded as a stable prop throughrenderElementinstead, preventing context-driven re-renders from stealingTextInputfocus on every keystroke.ComposableScreenStepTypeSchema.parse(step)is now wrapped inuseMemoso theelementsarray reference is stable across context-driven re-renders.ScrollViewinComposableScreenRenderernow useskeyboardShouldPersistTaps="handled"so a first tap on anInputinside aScrollViewcorrectly focuses the field rather than being swallowed.
[1.5.0] - 2026-04-21
Added
Iconelement renderer — rendersIconUIElements usinglucide-react-native(bundled, no extra install needed). Supportsname,size,color,strokeWidth, and allBaseBoxProps. Unknown icon names render nothing rather than crashing.Videoelement renderer — rendersVideoUIElements viaexpo-video(optional peer dep). Supportsurl,autoPlay,loop,muted,controls, and allBaseBoxProps. Shows an install-hint placeholder ifexpo-videois absent.expo-videoadded as optional peer dependency.
[1.4.0] - 2026-04-21
Added
Lottieelement renderer — rendersLottieUIElements vialottie-react-native. The package is an optional peer dep; if absent a placeholder view with an install hint is shown instead of crashing. Supportssource,autoPlay,loop,speed, and allBaseBoxProps.Riveelement renderer — rendersRiveUIElements viarive-react-native(optional peer dep with same graceful fallback). Supportsurl,autoplay,fit,alignment,artboardName,stateMachineName, and allBaseBoxProps.
Changed
BaseBoxPropsrefactor —width,height,opacity,margin*,padding*,borderWidth,borderRadius, andborderColorare now defined once in a sharedBaseBoxPropstype andBaseBoxPropsSchema, then extended byImage,Lottie, andRiveelement schemas.
Fixed
borderWidth,borderRadius, andborderColoronLottieandRiveelements now render correctly. Both native canvas components are wrapped in aViewwithoverflow: hiddenso border styles are applied by the wrapper rather than the animation view directly.
[1.3.0] - 2026-04-17
Added
ImageUIElement renderer forComposableScreen— mapsImagenodes to React Native<Image>with full prop pass-through:url,width,height,aspectRatio,resizeMode,borderRadius,borderWidth,borderColor,opacity, and all margin / padding shorthand props.aspectRatiofallback onImage— whenheightis not provided, the renderer appliesaspectRatio(explicit value or16/9default) so the image is always visible.
Fixed
- Removed unused
useSafeAreaInsetsimport and call fromComposableScreenRenderer(safe area is handled byOnboardingTemplate).
[1.2.0]
Added
- ComposableScreen renderer (under development) — renders the new
ComposableScreenstep type by recursively walking aUIElementtree and mapping each node to a nativeVieworText. The renderer now passes through all new layout props added in this release:borderWidth,borderRadius,borderColor,overflow,opacity,margin,marginHorizontal,marginVertical,width,height,minWidth,maxWidth,minHeight,maxHeighton stack elements;margin,marginHorizontal,marginVertical,borderWidth,borderRadius,borderColor, andopacityon text elements. packages/onboarding-ui/README.md— new README documenting the UI package, theComposableScreenelement tree API, and its supported props.
Note:
ComposableScreenis under active development. The renderer and element schema may change before they are considered stable.