A comprehensive library of customizable React Native components designed to accelerate your mobile app development. This library provides a collection of pre-styled, flexible UI components with consistent theming and simplified prop interfaces.
- π¨ Consistent styling across all components
- π Flexible props for quick customization
- π± Cross-platform support for iOS and Android
- π§© Modular design - use only what you need
- π Optional Expo integration with vector icons, haptics, and more
- π Theme support with light and dark mode
- π Responsive layouts with simplified dimension handling
npm install @idimma/rn-widgetThis library has the following peer dependencies:
Required:
npm install react-native-safe-area-contextOptional (for enhanced functionality):
# For Expo projects
expo install @expo/vector-icons expo-haptics expo-image expo-linear-gradient
# For gesture support
npm install react-native-gesture-handler react-native-reanimatedimport { View, Text, Image, Button } from '@idimma/rn-widget';
// Flexible View component with simplified props
<View
flex={1}
bg="#F2F5F7"
p={10}
m={5}
br={8}
bw={1}
bc="#CCCCCC"
row
center
>
{/* Your content here */}
</View>
// Text component with built-in styling
<Text
color="#2BAEDF" // You can use any color as prop: black, red, pink, etc.
fs={16}
fw="bold"
center // Align text to center
>
Hello, World!
</Text>
// Image component with simplified props
<Image
source={require('./path/to/image.png')}
resizeMode="cover"
w={200}
h={200}
radius={10}
/>
// Button component with built-in styling
<Button
title="Press Me"
primary // Use theme colors directly as props
onPress={() => console.log('Button pressed')}
rounded
m={10}
/>import { TextField } from '@idimma/rn-widget';
// Text input with built-in validation and styling
<TextField
label="Email Address"
placeholder="Enter your email"
email // Enables email keyboard and validation
error={emailError} // Display error message
onChangeText={setEmail}
/>import { Tabs } from '@idimma/rn-widget';
// Tab navigation with custom styling
<Tabs selectedTab={0}>
<View label="Tab 1">
<Text>Content for Tab 1</Text>
</View>
<View label="Tab 2">
<Text>Content for Tab 2</Text>
</View>
</Tabs>| Prop | Type | Description |
|---|---|---|
flex |
boolean | number |
Flex grow factor |
bg |
string |
Background color |
p |
number |
Padding for all sides |
m |
number |
Margin for all sides |
br |
number |
Border radius |
bw |
number |
Border width |
bc |
string |
Border color |
row |
boolean |
Set flexDirection to row |
column |
boolean |
Set flexDirection to column |
center |
boolean |
Center content horizontally and vertically |
| Prop | Type | Description |
|---|---|---|
color |
string |
Text color See list of colors |
fs |
number |
Font size |
fw |
'normal' | 'bold' | number |
Font weight |
align |
'auto' | 'left' | 'right' | 'center' |
Text alignment |
ff |
string |
Font family (regular, bold, medium, light) |
| Prop | Type | Description |
|---|---|---|
source |
ImageSourcePropType |
Source of the image (usually requires a path or URL) |
resizeMode |
'cover' | 'contain' | 'stretch' |
Resize mode for the image |
w |
number |
Width of the image |
h |
number |
Height of the image |
radius |
number |
Border radius for the image |
| Prop | Type | Description |
|---|---|---|
title |
string |
Button text |
onPress |
function |
Function to call when button is pressed |
primary |
boolean |
Use primary theme color |
secondary |
boolean |
Use secondary theme color |
disabled |
boolean |
Disable the button |
loading |
boolean |
Show loading indicator |
rounded |
boolean |
Apply rounded corners |
| Prop | Type | Description |
|---|---|---|
label |
string |
Input label |
placeholder |
string |
Placeholder text |
value |
string |
Input value |
onChangeText |
function |
Function to call when text changes |
error |
string |
Error message to display |
email |
boolean |
Enable email keyboard and validation |
phone |
boolean |
Enable phone keyboard and validation |
numbers |
boolean |
Enable numeric keyboard |
secureTextEntry |
boolean |
Hide text input (for passwords) |
| Prop | Type | Description |
|---|---|---|
selectedTab |
number |
Index of the initially selected tab |
children |
ReactElement[] |
Tab content elements with label prop |
- Fixed GitHub Actions workflow by switching from Yarn to npm
- Resolved CI pipeline issues with missing Yarn binary
- Updated cache configuration to use package-lock.json
- Fixed TypeScript compilation errors
- Improved build configuration
- Added comprehensive type declarations
- Enhanced component documentation
- Updated Expo package compatibility
See the CHANGELOG for a complete list of changes.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library