# Expo Svelte
> Svelte 5 on React Native Fabric, with no React: write Android and iOS apps as Svelte components. This is its guide. Every page is also available as Markdown, at the address listed.
## Getting started
- [Introduction](https://svelte-native.alfayez.dev/docs/introduction.md): Write Android and iOS apps as Svelte 5 components that become real native views, laid out and drawn by the platform.
- [Creating a project](https://svelte-native.alfayez.dev/docs/creating-a-project.md): Create a SvelteKit project, add Expo Svelte and run the app on a phone or an emulator.
- [Project structure](https://svelte-native.alfayez.dev/docs/project-structure.md)
- [Coming from the web](https://svelte-native.alfayez.dev/docs/coming-from-the-web.md): Svelte on a phone is the Svelte you know: the same compiler, the same runes, the same template syntax. What is different is everything the browser used to...
## Core concepts
- [Routing](https://svelte-native.alfayez.dev/docs/routing.md): Expo Svelte has SvelteKit's filesystem-based router: the directories under src/routes are the screens of your app. Web routes are +page.svelte and...
- [Styling](https://svelte-native.alfayez.dev/docs/styling.md): There is no CSS engine on the device. Each component takes a style prop: a plain object with React Native's style keys, in camelCase, with numbers for sizes....
- [Loading data](https://svelte-native.alfayez.dev/docs/loading-data.md): A native screen is not rendered on a server and has no load function. It loads its own data when it appears, in one of two ways: with fetch, or with...
- [State management](https://svelte-native.alfayez.dev/docs/state-management.md): State works as in any Svelte app: $state in a component, shared state in .svelte.ts modules, and context for state that belongs to part of the tree. A few...
- [HTML elements](https://svelte-native.alfayez.dev/docs/html-elements.md): You can write a native screen with HTML elements.
,
, , , , and the rest of the list below become native components when...
- [SvelteKit modules](https://svelte-native.alfayez.dev/docs/sveltekit-modules.md): A page you share with the web imports SvelteKit's modules: goto from $app/navigation, page from $app/state, resolve from $app/paths, spring from...
- [Hooks](https://svelte-native.alfayez.dev/docs/hooks.md): src/hooks.mobile.ts is the native app's hooks.client.ts. It holds code that runs when the app starts, before any screen, and the hooks that remote functions...
## Components
- [View](https://svelte-native.alfayez.dev/docs/view.md): View is the basic box of a native screen, the counterpart of a div. It lays out its children with flexbox, draws a background, a border and a shadow, and can...
- [Text](https://svelte-native.alfayez.dev/docs/text.md): Text draws text. It's the only component that can: a string anywhere else isn't drawn. A Text inside a Text styles part of a sentence, as a span does on the...
- [Pressable](https://svelte-native.alfayez.dev/docs/pressable.md): Pressable makes whatever it wraps respond to a tap. Use it for buttons, list rows and anything else the user presses. It's a View with press handling: it...
- [TextInput](https://svelte-native.alfayez.dev/docs/text-input.md): TextInput is a native text field, single-line or multi-line. Bind its value to a variable, as you would an input on the web. The platform draws it, so it has...
- [Switch](https://svelte-native.alfayez.dev/docs/switch.md): Switch is the platform's on/off toggle: a Material switch on Android, a UISwitch on iOS. Bind its value to a boolean.
- [Image](https://svelte-native.alfayez.dev/docs/image.md): Image shows a picture: a file bundled with the app, or one from a URL.
- [ScrollView](https://svelte-native.alfayez.dev/docs/scroll-view.md): ScrollView scrolls content that doesn't fit, vertically or sideways. It mounts all of its children at once, so it suits a screen's content, a form or a few...
- [List](https://svelte-native.alfayez.dev/docs/list.md): List shows a long list of rows and mounts only the ones near the screen. Scrolling through 5,000 rows costs about as much as showing 20. Give it the items, a...
- [Modal](https://svelte-native.alfayez.dev/docs/modal.md): Modal shows content in a layer over the whole app, header and tab bar included. It's for UI that belongs to the current screen and has no address of its own:...
- [SafeAreaView](https://svelte-native.alfayez.dev/docs/safe-area-view.md): SafeAreaView is a View padded by the safe-area insets: the space the status bar, a notch, the home indicator and the system navigation bar take at the edges...
- [KeyboardAvoidingView](https://svelte-native.alfayez.dev/docs/keyboard-avoiding-view.md): KeyboardAvoidingView moves its content out of the keyboard's way. When the keyboard opens and covers part of the view, it adds padding, shrinks or lifts the...
- [ActivityIndicator](https://svelte-native.alfayez.dev/docs/activity-indicator.md): ActivityIndicator is the platform's spinner: a Material progress circle on Android, a UIActivityIndicatorView on iOS. Show it while something loads.
- [Screen](https://svelte-native.alfayez.dev/docs/screen.md): Screen configures the native screen a page is shown in: its header, a search field, a bottom toolbar, how a sheet sizes itself, and the system bars. Put one...
- [Stack](https://svelte-native.alfayez.dev/docs/stack.md): Stack sets the defaults of every screen in a stack navigator: the header style, the transition, the background, the system bars. You write it in the layout...
- [Tabs](https://svelte-native.alfayez.dev/docs/tabs.md): Tabs draws a tab bar at the bottom of the screen, with a pane for each tab: UIKit's UITabBar on iOS, a Material-style bottom bar on Android. Each pane keeps...
- [BlurView](https://svelte-native.alfayez.dev/docs/blur-view.md): BlurView blurs whatever is behind it on the screen, and draws its children sharp on top: a frosted card over a photo, a header over a list. It is part of...
## Native features
- [Native libraries](https://svelte-native.alfayez.dev/docs/native-libraries.md): The Expo and React Native ecosystem has libraries for most of what a phone can do: sensors, notifications, location, secure storage, haptics. Expo Svelte can...
- [Native views](https://svelte-native.alfayez.dev/docs/native-views.md): Some libraries give you a view that the platform draws: an image with a placeholder and a disk cache, a blur, a video player, a map. expo-svelte/foreign has...
- [SVG](https://svelte-native.alfayez.dev/docs/svg.md): expo-svelte draws vector graphics with react-native-svg, as Svelte components. The elements and their props are the ones you know from SVG on the web,...
- [Animation](https://svelte-native.alfayez.dev/docs/animation.md): Animations in Expo Svelte run on the UI thread, with Reanimated, so they stay smooth while JavaScript is busy. expo-svelte gives you an AnimatedView, shared...
- [Gestures](https://svelte-native.alfayez.dev/docs/gestures.md): Drags, pinches, swipes and long presses are recognised by the platform, with react-native-gesture-handler. expo-svelte puts its gestures on Svelte views. You...
- [Platform APIs](https://svelte-native.alfayez.dev/docs/platform-apis.md): The device is more than a screen. It has an operating system, a window size, a light and dark mode, a safe area around the notch, a keyboard, and links that...
- [Web APIs](https://svelte-native.alfayez.dev/docs/web-apis.md): On the device, fetch, Blob, crypto, localStorage and navigator's clipboard, share and geolocation are the web's own, with nothing to import. Code you share...
- [Updates](https://svelte-native.alfayez.dev/docs/updates.md): An over-the-air update replaces your app's JavaScript without a new build from the store. Expo Svelte has its own updates client, expo-svelte/updates, which...
- [Push notifications](https://svelte-native.alfayez.dev/docs/push-notifications.md): An Expo Svelte app can get push notifications three ways. They differ in who delivers a message, where the keys that can send to every user are kept, and how...
## Build and deploy
- [Development builds](https://svelte-native.alfayez.dev/docs/development-builds.md): A web app runs in a browser that already exists. A native app has to be built: compiled, packaged and installed on a device. This page explains how that...
- [Release builds](https://svelte-native.alfayez.dev/docs/release-builds.md): A release build has your JavaScript bundled inside it, compiled to bytecode, so it runs without Metro. It's what you give to testers and publish to the stores.
## Appendix
- [Adding to an existing Expo app](https://svelte-native.alfayez.dev/docs/adding-to-an-existing-expo-app.md): Creating a project starts from SvelteKit. This page is for the other direction: you have an Expo app, and you want its screens written in Svelte. The result...
- [Troubleshooting](https://svelte-native.alfayez.dev/docs/troubleshooting.md): Most problems in the first hour are one of a few. Start with the doctor: it finds many of them for you.
## Reference
- [Command line](https://svelte-native.alfayez.dev/docs/cli.md): The expo-svelte command, with init, doctor, push, android, ios, dev, build, sync and css.
- [Configuration](https://svelte-native.alfayez.dev/docs/configuration.md): What expo-svelte init writes, file by file, and the options of the Vite, Metro and Expo plugins. Every change is an ordinary edit: you can make them by hand,...
- [Modules](https://svelte-native.alfayez.dev/docs/modules.md): Expo Svelte's code is split into a few entry points. An app imports almost everything from the main one and reaches for /foreign, /platform, /remote,...