Decathlon / vitamin-ios

Decathlon Design System UI components for iOS & iPadOS applications
https://www.decathlon.design
Apache License 2.0
48 stars 14 forks source link
components design design-system ios ios-library mobile ui ui-components uikit vitamin

[!IMPORTANT] This current version of Vitamin will no longer evolve and only accept bug fixes from now on. More details here.


Vitamin Decathlon Design System logo Vitamin Decathlon Design System logo

Vitamin iOS

Decathlon Design System libraries for iOS & iPadOS applications

Website

Introduction

Decathlon Design System is the framework that helps our ecosystem to design and develop consistent and quality experiences.
For its Digital section, it is called Vitamin.

Install

SPM

Add Vitamin to the dependencies array of your package:

dependencies: [
  .package(url: "https://github.com/Decathlon/vitamin-ios.git", .exact("0.13.0")),
  // Any other dependencies...
],

Then, add Vitamin to the dependencies array of any target that depends on Vitamin.
For SwiftUI:

.target(name: "YourSwiftUITarget",
        dependencies: [
            .product(name: "VitaminSwiftUI", package: "vitamin-ios"),
            // Any other dependencies...
        ]),

For UIKit:

.target(name: "YourUIKitTarget",
        dependencies: [
            .product(name: "Vitamin", package: "vitamin-ios"),
            // Any other dependencies...
        ]),

A full example:

let package = Package(
    name: "YourPackage",
    products: [
        // Your products
    ],
    dependencies: [
        .package(url: "https://github.com/Decathlon/vitamin-ios.git", .exact("0.13.0")),
        // Any other dependencies...
    ],
    targets: [
        // Your target
        .target(name: "YourUIKitTarget",
                dependencies: [
                    .product(name: "Vitamin", package: "vitamin-ios"),
                    // Any other dependencies...
                ]), 
        .target(name: "YourSwiftUITarget",
                dependencies: [
                    .product(name: "VitaminSwiftUI", package: "vitamin-ios"),
                    // Any other dependencies...
                ]),
    ]
)

Cocoapods

# for UIKitVersion
pod 'Vitamin', '= 0.13.0'

# for SwiftUI version
pod 'VitaminSwiftUI', = '0.13.0'

Available elements

This library provides two types of elements: Foundations and Components.
Foundations are core bricks of Vitamin Design System, and Components are high level elements, built upon Foundations.

Foundations

The following foundations are available : Element Description Documentation
Assets Set of graphic assets usable in the Design System. UIKit SwiftUI
Colors Semantics and base colors of the Design System. UIKit SwiftUI
Icons Set of icons usable in the Design System. UIKit SwiftUI
Radiuses Radiuses applicable to any view in the Design System. UIKit SwiftUI
Shadows Shadows applicable to any view in the Design System. UIKit SwiftUI
Typography Text styles usable in the Design System. UIKit SwiftUI

Components

The following components are available : Component Description Documentation
Badge Badges from the Vitamin Design System. UIKit SwiftUI
Button Different button styles from the Vitamin Design System. UIKit SwiftUI
Progressbar Different progressbar styles from the Vitamin Design System. UIKit
SegmentedControl SegmentedControl from the Vitamin Design System. UIKit
Snackbar Snackbar from the Vitamin Design System. UIKit
Switch Switch from the Vitamin Design System. UIKit
Tag Tag from the Vitamin Design System. UIKit
TextField Different text fields styles from the Vitamin Design System. UIKit SwiftUI

Special thanks

Thank you to the contributors involved in these vitamin-ios libraries (even before they were Open Source). 💙

Thank you also Remix Icon because Vitamix Icons is the official Decathlon icon library based on their open-source icon library (Remix Design © 2020). This original library is under the license Apache 2.0 and has been modified by Decathlon. Learn more.

License

Copyright 2021 Decathlon.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.