1.36.9 โ€ข Published 4 days ago

@pagopa/io-app-design-system v1.36.9

Weekly downloads
-
License
MIT
Repository
github
Last release
4 days ago

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-system

Remember 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'

Activate the toggle at the top of the application to view the experimental design system.

!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.

Playground & Documentation

A Storybook playground is also available to help develop and test components. To start it in the local environment, run the following command:

yarn storybook

Storybook documentation is a work in progress

Usage

To try a component, just import it:

import { ButtonSolid } from '@pagopa/io-app-design-system';

// [...]

const MainScreen = () => (
  <View>
    <ButtonSolid
      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 utilities
  • IOSpacing: Defines the main spacing scale and various component spacing attributes
  • IOStyles: Defines common styles shared across components
  • IOShapes: Defines visual shape-related attributes, such as radius
  • IOAnimations: Defines common animation attributes used for interactive elements (used by the reanimated library)
  • IOTransitions: Defines reusable custom enter/exit transitions (used by the reanimated library)

Explore the core folder โ†’

Foundation

Essential atomic components:

Components

Explore the components folder โ†’

!note Some components that can be tested in the official DS section are missing

Functions

Common functions used to wrap up external libraries and utilities

Explore the functions folder โ†’

Dependencies


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

1.36.8

4 days ago

1.36.9

4 days ago

1.36.7

5 days ago

1.36.5

5 days ago

1.36.3

5 days ago

1.36.6

5 days ago

1.36.2

13 days ago

1.36.1

14 days ago

1.36.0

19 days ago

1.35.0

21 days ago

1.34.0

26 days ago

1.33.0

1 month ago

1.32.0

1 month ago

1.32.1

1 month ago

1.31.0

1 month ago

1.30.0

2 months ago

1.29.0

2 months ago

1.28.1

2 months ago

1.28.0

2 months ago

1.27.0

2 months ago

1.26.0

2 months ago

1.25.1

2 months ago

1.25.0

2 months ago

1.24.0

2 months ago

1.23.3

3 months ago

1.23.2

3 months ago

1.23.0

3 months ago

1.23.1

3 months ago

1.22.0

3 months ago

1.21.0

3 months ago

1.20.1

3 months ago

1.20.0

4 months ago

1.19.0

5 months ago

1.18.0

5 months ago

1.17.2

5 months ago

1.17.1

5 months ago

1.17.0

6 months ago

1.16.1

6 months ago

1.16.0

6 months ago

1.15.0

6 months ago

1.14.0

7 months ago

1.13.1

7 months ago

1.13.0

7 months ago

1.12.0

7 months ago

1.11.3

7 months ago

1.11.2

7 months ago

1.11.1

7 months ago

1.11.0

7 months ago

1.10.0

7 months ago

1.9.3

8 months ago

1.9.2

8 months ago

1.9.1

8 months ago

1.9.0

8 months ago

1.8.0

8 months ago

1.7.1

8 months ago

1.7.0

8 months ago

1.6.1

8 months ago

1.6.0

8 months ago

1.5.1

8 months ago

1.4.0

8 months ago

1.3.2

9 months ago

1.3.1

9 months ago

1.3.0

9 months ago

1.2.0

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.0.0

9 months ago

1.0.0-16

10 months ago

1.0.0-15

10 months ago

1.0.0-14

10 months ago

1.0.0-11

10 months ago

1.0.0-10

10 months ago

1.0.0-9

10 months ago

1.0.0-8

10 months ago

1.0.0-7

10 months ago

1.0.0-5

10 months ago

1.0.0-4

10 months ago

1.0.0-3

10 months ago

1.0.0-2

10 months ago

1.0.0-1

10 months ago

1.0.0-0

10 months ago