Set up an Expo, bare React Native or Flutter project for lokalhost Mobile.
npx create-expo-app@latest my-app
cd my-appMost components only need the core libraries below. Each page lists anything extra.
npx expo install react-native-reanimated react-native-gesture-handler react-native-safe-area-context @expo/vector-iconsSnippets import from @/components/ui and @/lib/theme. Expo supports tsconfig paths out of the box:
{
"extends": "expo/tsconfig.base",
"compilerOptions": {
"strict": true,
"paths": { "@/*": ["./*"] }
}
}Copy lib/theme.ts from the Theming page. Every component reads colours through useTheme().
Gesture-based components (Bottom Sheet, Toast) need a gesture root and safe-area provider:
import { Stack } from "expo-router";
import { GestureHandlerRootView } from "react-native-gesture-handler";
import { SafeAreaProvider } from "react-native-safe-area-context";
import { ToastProvider } from "@/components/ui/toast";
export default function RootLayout() {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<SafeAreaProvider>
<ToastProvider>
<Stack screenOptions={{ headerShown: false }} />
</ToastProvider>
</SafeAreaProvider>
</GestureHandlerRootView>
);
}npx @react-native-community/cli@latest init MyApp
cd MyApp
npm i react-native-reanimated react-native-gesture-handler react-native-safe-area-context react-native-vector-icons
npx pod-installAdd the Reanimated plugin last in babel.config.js:
module.exports = {
presets: ["module:@react-native/babel-preset"],
plugins: ["react-native-reanimated/plugin"],
};Components import icons from @expo/vector-icons. In a bare app, either install expo modules or replace the import with react-native-vector-icons/Ionicons — the glyph names are identical.
flutter create my_app
cd my_appFlutter 3.22+ (Dart 3.4+) is required — widgets use records, switch expressions and Color.withValues.
Copy lib/theme/lk_theme.dart from the Theming page and wire it into MaterialApp:
import 'package:flutter/material.dart';
import 'theme/lk_theme.dart';
void main() => runApp(const App());
class App extends StatelessWidget {
const App({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: lkTheme(Brightness.light),
darkTheme: lkTheme(Brightness.dark),
home: const Placeholder(),
);
}
}Widgets go in lib/widgets/, screens in lib/screens/ and blocks in lib/blocks/. They use relative imports, so keep that layout or switch to package: imports.