@pagopa/io-app-design-system v5.7.2
Getting started
Prerequisites
To contribute to the library development, you will need to install nodejs and yarn. We recommend using nvm to properly handle the supported nodejs version (see .nvmrc).
Learn more about the io-app prerequisites โ
Installing the component library
To add the component library to the main app run:
yarn add @pagopa/io-app-design-systemRemember to encapsulate the app container with the SafeAreaProvider from react-native-safe-area-context in your App.tsx file. Also, remember to apply this wrapper in other relevant places such as the root components of modals and routes when utilizing react-native-screens:
import { SafeAreaProvider } from 'react-native-safe-area-context';
function App() {
return <SafeAreaProvider>...</SafeAreaProvider>;
}Launch the example app
For development purposes, a sample React Native application is included in the repository. To launch it:
# Move into `example` folder
cd example
# Install dependencies
yarn install
# Install podfiles when targeting iOS (ignore this step for Android)
# Run this only during the first setup and when Pods dependencies change
cd iOS && bundle exec pod install
# Launch the app locally (simulator flag is optional)
yarn ios --simulator='iPhone 15 Pro'Playground
Consider the example app your playground when developing and testing current or new components. If you need to build new components, ensure that you test them in the same environment as our users, without making any technical trade-offs (like testing them in a browser)
!important The sample application consists of several pages with some components for testing purposes. To view the continuously updated Design System section, please refer to the main app.
Usage
To try a component, just import it:
import { IOButton } from '@pagopa/io-app-design-system';
// [...]
const MainScreen = () => (
<View>
<IOButton
variant="solid"
accessibilityLabel="Tap to trigger test alert"
label="Hello world"
onPress={() => Alert.alert("Alert", "Action triggered")}
/>
</View>
);Architecture
The library is made up of several parts:
Core
Essential core visual attributes of the design language. It includes:
IOColors: Defines the main color palette, themes (light/dark) and other color-related utilitiesIOSpacing: Defines the main spacing scale and various component spacing attributesIOStyles: Defines common styles shared across componentsIOShapes: Defines visual shape-related attributes, such as radiusIOAnimations: Defines common animation attributes used for interactive elements (used by thereanimatedlibrary)IOTransitions: Defines reusable custom enter/exit transitions (used by thereanimatedlibrary)
Explore the core folder โ
Foundation
Essential atomic components:
- Typography ยท ๐ Docs
- Layout ยท ๐ Docs
- Icons ยท ๐ Docs
- Assets with an intended size between
12pxand56px - [HowTo] Add a new icon โ
- Assets with an intended size between
- Pictograms ยท ๐ Docs
- Assets with an intended size greather than
56px - [HowTo] Add a new pictogram โ
- Assets with an intended size greather than
- Logos ยท ๐ Docs
- Loaders
Components
- Buttons
- TextInput
- List Items
- Modules
- Badges & Tags
- Selection
- Accordion
- Alert
- Advice & Banners
- Headers ยท ๐ Docs
- Templates ยท ๐ Docs
!important If you want to test the above components in a real environment, please refer to the Design System section in the main IO app. Please be aware that certain components displayed in that section are exclusively accessible in the
io-apprepository.
Explore the components folder โ
Functions
Common functions used to wrap up external libraries and utilities
Explore the functions folder โ
Contexts
The contexts used in and exported from the library.
Explore the context folder โ
Dependencies
react-native-reanimated: Handles all the component animationsreact-native-svg: Handles all the vector asset components (icons, pictograms and logos)react-native-haptic-feedback: Handles all the haptic feedbacksreact-native-safe-area-context: Handles all safe area spacing attributesreact-native-linear-gradientreact-native-easing-gradient: Generates easing gradientsreact-native-gesture-handler
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library
11 months ago
11 months ago
11 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
12 months ago
7 months ago
8 months ago
8 months ago
8 months ago
8 months ago
12 months ago
12 months ago
8 months ago
8 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
12 months ago
12 months ago
12 months ago
9 months ago
9 months ago
9 months ago
6 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
10 months ago
7 months ago
9 months ago
9 months ago
9 months ago
8 months ago
9 months ago
12 months ago
12 months ago
10 months ago
11 months ago
10 months ago
10 months ago
8 months ago
9 months ago
9 months ago
9 months ago
9 months ago
6 months ago
6 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
11 months ago
6 months ago
6 months ago
11 months ago
11 months ago
5 months ago
5 months ago
5 months ago
5 months ago
6 months ago
6 months ago
6 months ago
6 months ago
11 months ago
5 months ago
5 months ago
5 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago