Skip to content

andrew-levy/jetpack-compose-react-native

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b4e4c42 · Jan 24, 2025

History

35 Commits
Jan 24, 2025
Jan 24, 2025
Jan 24, 2025
Oct 8, 2024
Oct 8, 2024
Oct 8, 2024
Jan 24, 2025
Oct 9, 2024
Jan 24, 2025
Oct 8, 2024
Oct 8, 2024
Oct 9, 2024

Repository files navigation

Jetpack Compose React Native

This project is in early development and is not yet ready for use.

Getting started

Add the plugin to your app.json. This will allow your Android app to use Jetpack Compose.

{
  "plugins": ["jetpack-compose-react-native"]
}

Next, prebuild your app.

npx expo prebuild -p android --clean

Usage

import { Button, Switch, Column, Text } from "jetpack-compose-react-native";
import { useState } from "react";

export default function App() {
  const [checked, setChecked] = useState(false);
  return (
    <Column>
      <Text>Use Jetpack Compose views in your RN app!</Text>
      <Button title="Press me" onClick={() => console.log("Button pressed")} />
      <Switch
        checked={checked}
        onCheckedChange={(isChecked) => setChecked(isChecked)}
      />
    </Column>
  );
}

Contributors

To Do (WIP)

  • Button
  • Switch
  • Slider
  • Column
  • Row
  • Icon
  • Progress Indicator (Circular + Linear)
  • Checkbox
  • Other types of buttons
  • Card
  • Spacer
  • Chip
  • Badge
  • Horizontal Divider
  • Vertical Divider
  • Text Field
  • Dialog
  • Text
  • Carousel
  • Snackbar
  • Bottom Sheet
  • Time/Date Picker (WIP...)
  • LazyColumn/Row (just add a lazy prop to the existing components)
  • LazyGrid (vertical and horizontal props from the same component)
  • LazyStaggeredGrid (vertical and horizontal props from the same component)
  • Box
  • More modifiers!