Skip to Content
Guide

Native Migration

How to migrate from other React Native UI libraries to Kiva UI Native.

Overview

This guide helps you migrate from popular React Native UI libraries to Kiva UI Native. Each section covers the key differences and provides mapping tables for common components.

From React Native Paper

React Native Paper uses Material Design. Kiva UI Native follows a custom design system with semantic color tokens.

Theme Migration

// Before (Paper)
import { Provider as PaperProvider, DefaultTheme } from 'react-native-paper';

const theme = {
  ...DefaultTheme,
  colors: {
    ...DefaultTheme.colors,
    primary: '#6200ee',
    accent: '#03dac4',
  },
};

<PaperProvider theme={theme}>
  <App />
</PaperProvider>

// After (Kiva)
import { KivaThemeProvider } from '@/lib/theme';

<KivaThemeProvider colorScheme="violet" mode="system">
  <App />
</KivaThemeProvider>

Component Mapping

PaperKiva UI NativeNotes
<Button><Button>Use variant prop instead of mode
<TextInput><Input>Different prop names
<Card><Card>Similar structure
<Chip><Badge>Different naming
<Dialog><Modal>Uses visible prop
<Snackbar><Toast>Different API
<DataTable><DataTable>Richer API with sorting, filtering
<FAB>No direct equivalentBuild with <Button> + absolute positioning
<BottomNavigation>Use Expo Router tabsFramework-level navigation

Styling Differences

// Paper — theme.colors.primary
const { colors } = useTheme();
<View style={{ backgroundColor: colors.primary }}>

// Kiva — useKivaTheme().colors.primary
const { colors } = useKivaTheme();
<View style={{ backgroundColor: colors.primary }}>

From NativeBase

NativeBase uses a utility-first styling approach similar to Tailwind. Kiva UI Native uses direct style objects.

Theme Migration

// Before (NativeBase)
import { NativeBaseProvider, extendTheme } from 'native-base';

const theme = extendTheme({
  colors: { primary: { 500: '#6200ee' } },
});

<NativeBaseProvider theme={theme}>
  <App />
</NativeBaseProvider>

// After (Kiva)
import { KivaThemeProvider } from '@/lib/theme';

<KivaThemeProvider colorScheme="violet" mode="system">
  <App />
</KivaThemeProvider>

Styling Differences

// NativeBase — utility props
<Box bg="primary.500" p={4} rounded="lg" shadow={2}>
  <Text color="white" fontSize="lg">Hello</Text>
</Box>

// Kiva — style objects with theme
const { colors, spacing, borderRadius } = useKivaTheme();

<View style={{
  backgroundColor: colors.primary,
  padding: spacing[4],
  borderRadius: borderRadius.lg,
  elevation: 2,
}}>
  <Text style={{ color: colors.primaryForeground, fontSize: 18 }}>Hello</Text>
</View>

Component Mapping

NativeBaseKiva UI NativeNotes
<Box><View>Use React Native's View
<Button><Button>Similar API
<Input><Input>Similar API
<Select><Select>Different styling
<Modal><Modal>Similar API
<Toast><Toast>Different API
<Avatar><Avatar>Similar API
<Badge><Badge>Similar API
<Spinner><ActivityIndicator>Use React Native's

From Tamagui

Tamagui uses a compiler-optimized styling system. Kiva UI Native uses runtime styling via theme context.

Key Differences

FeatureTamaguiKiva UI Native
StylingCompiled (build-time)Runtime (theme context)
Tokens$size.4, $color.bluespacing[4], colors.blue[500]
Animations@tamagui/animations-react-nativeDirect Animated or reanimated
Web supportUniversal (web + native)Native only
Theme systemToken-based with createThemeSemantic color schemes

Styling Migration

// Tamagui — token-based props
<YStack padding="$4" backgroundColor="$background" borderRadius="$4">
  <Text color="$color" fontSize="$5">Hello</Text>
</YStack>

// Kiva — style objects
const { colors, spacing, borderRadius } = useKivaTheme();

<View style={{
  padding: spacing[4],
  backgroundColor: colors.background,
  borderRadius: borderRadius.lg,
}}>
  <Text style={{ color: colors.foreground, fontSize: 18 }}>Hello</Text>
</View>

From Gluestack UI

Gluestack UI is the spiritual successor to NativeBase with a new styling engine.

Key Differences

FeatureGluestackKiva UI Native
Stylingstyled() + utility propsuseKivaTheme() + style objects
TokensDesign tokens via configSemantic colors + spacing scale
ComponentsHeadless + styledStyled with theme

Migration Pattern

// Gluestack
import { Button, ButtonText } from '@gluestack-ui/themed';

<Button size="md" variant="solid" action="primary">
  <ButtonText>Click me</ButtonText>
</Button>

// Kiva
import { Button } from '@/components/kiva-native/button';

<Button variant="default" size="default" onPress={handlePress}>
  Click me
</Button>

General Migration Tips

1. Install KivaThemeProvider First

Before migrating any components, set up the theme provider at your app root. This ensures all migrated components have access to theme values.

2. Migrate Bottom-Up

Start with leaf components (Button, Input, Badge) and work up to compound components (DataTable, Form). This minimizes cascading changes.

3. Keep Both Libraries Temporarily

During migration, you can use both libraries simultaneously. Remove the old library only after all components are migrated.

{
  "dependencies": {
    "react-native-paper": "^5.0.0",
    "@kivacore/ui-native": "workspace:*"
  }
}

4. Map Your Color Tokens

Create a mapping between your current library's color tokens and Kiva semantic tokens:

Your TokenKiva Token
primarycolors.primary
onPrimarycolors.primaryForeground
surfacecolors.card
onSurfacecolors.cardForeground
errorcolors.destructive
backgroundcolors.background

5. Replace Theme Hooks

Find-and-replace your current theme hook with Kiva:

// Common patterns to replace
useTheme()        → useKivaTheme()
theme.colors.X    → colors.X
theme.spacing.X   → spacing[X]
theme.roundness   → borderRadius.DEFAULT

6. Update Imports

After installing Kiva components via CLI:

kiva-ui add rn-button rn-input rn-card rn-badge

Update imports:

// Before
import { Button } from 'react-native-paper';

// After
import { Button } from '@/components/kiva-native/button';

On this page