Reusable components for Expo and React Native projects inspired by shadcn-ui.
Install malla ui system to your Expo or React Native CLI project
- This command will add the the styles config into your project in /styles folder.
npx mallaui@latest init
- Pass installed styles to your ThemeProvider in _layout (for Expo navigation) or App.tsx (for react-navigation in Expo and React Native CLI)
import {useTheme} from '../styles/useTheme';
import {ThemeProvider} from '@react-navigation/native';
...
function RootLayoutNav() {
const {theme} = useTheme();
return (
<ThemeProvider value={theme.navigation}>
...
</ThemeProvider>
);
}
- After that you could add components to your project
npx mallaui@latest add Text
- Text
- Button
- Input
- Switch
- Checkbox
- Radiogroup
- Tabs