@swift-byte/switftbytecomponents v1.0.15
SwiftByteComponents
SwiftByteComponents is a versatile and comprehensive React Native component library designed to accelerate mobile app development. It provides a collection of reusable and customizable UI components that follow best practices and modern design principles.
Table of Contents
Installation
To install SwiftByteComponents, use npm or yarn:
npm install @swiftbyte/swiftbyte-components
or
yarn add @swiftbyte/swiftbyte-components
Usage
Import the components you need and start using them in your React Native project. Here's a simple example:
import React from 'react';
import { View } from 'react-native';
import { Button, Card } from 'swiftbyte-components';
const App = () => {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Card>
<Button title="Press me" onPress={() => alert('Button pressed!')} />
</Card>
</View>
);
};
export default App;
Components
SwiftByteComponents includes a variety of components to help you build your app quickly and efficiently. Some of the key components are:
- Button: A customizable button component with support for different styles and states.
- Card: A flexible card component for displaying content in a contained layout.
- Input: An input field component with validation and custom styling options.
- Modal: A modal component for displaying overlays and dialog boxes.
- List: A list component for rendering collections of data.
- Avatar: A component for displaying user profile pictures or icons. For a complete list of components and their detailed usage, please refer to the documentation.
Customization
Each component in SwiftByteComponents is designed to be easily customizable. You can pass custom styles and props to tailor the components to your app's design requirements. For example:
<Button
title="Custom Button"
onPress={() => alert('Custom button pressed!')}
style={{ backgroundColor: 'blue', padding: 10 }}
textStyle={{ color: 'white', fontSize: 18 }}
/>
For more advanced customization, you can override default styles and extend components as needed. Refer to the customization guide for more details.