UI & Components

Solid Native components compile directly to native Fabric views through Solid 2's universal renderer. Signal updates patch only the affected native prop or text leaf—components never re-run on state changes.

Basic component#

tsx
/** @jsxImportSource @solidnative-dev/core */
import { createSignal } from "solid-js";
import {
  Button,
  SafeAreaView,
  StyleSheet,
  Text,
  View,
} from "@solidnative-dev/core";

const styles = StyleSheet.create({
  screen: { flex: 1, padding: 24, gap: 16, justifyContent: "center" },
  title: { fontSize: 28, fontWeight: "700" },
  counter: { fontSize: 18 },
});

export function ProfileCard() {
  const [likes, setLikes] = createSignal(0);

  return (
    <SafeAreaView style={styles.screen}>
      <Text style={styles.title}>Solid Native</Text>
      <View>
        <Text style={styles.counter}>Likes: {likes()}</Text>
      </View>
      <Button title="Like" onPress={() => setLikes((n) => n + 1)} />
    </SafeAreaView>
  );
}

Core UI primitives#

Exported from @solidnative-dev/core:

CategoryPrimitives
Layout & safe areaView, SafeAreaProvider, SafeAreaView, KeyboardAvoidingView, StatusBar
Text & mediaText, Image, ActivityIndicator
Input & controlsButton, Pressable, TextInput, TextInputFocusGroup, Switch
Scrolling & listsScrollView, RefreshableScrollView, KeyboardAwareScrollView, VirtualizedList
Overlays & screensModal, Screen, ScreenStack, ScreenHeader, TabsHost, TabsScreen
StylingStyleSheet.create, StyleSheet.compose, StyleSheet.flatten, absoluteFill

Platform packages#

Native device capabilities ship as separate, React-free packages with typed Solid bindings:

PackageCapability
@solidnative-dev/storageBounded key-value persistence (AsyncStorage 3 backend)
@solidnative-dev/secure-storageiOS Keychain / Android Keystore secrets
@solidnative-dev/networkingBounded HTTP requests, JSON resources, and SSE streams
@solidnative-dev/cameraNative camera preview and capture
@solidnative-dev/notificationsLocal & push notification permissions and events
@solidnative-dev/dialogsNative platform alerts and confirmation sheets
@solidnative-dev/sharingNative iOS/Android share sheet
@solidnative-dev/clipboardClipboard read/write
@solidnative-dev/localizationLocale, RTL, and currency/region reactivity
@solidnative-dev/accessibilityScreen-reader state, reduce-motion, and announcements
@solidnative-dev/vibrationHaptic feedback and vibration patterns