8000 GitHub - alfian0/Design-System
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

alfian0/Design-System

Repository files navigation

Podcast App Design System

Thumbail

Overview

The Design System package is a personal project designed to implement a comprehensive design system for new projects. This package aims to provide a consistent and reusable set of design elements and resources, such as color tokens, typography, and component styles, to ensure uniformity across different projects. It leverages Swift Package Manager (SPM) to manage and distribute these design assets efficiently.

Resource

The design system includes Figma files that contain design guidelines, component specifications, and visual references. These resources help ensure that the implementation aligns with the design standards set in Figma. Access these files in the Figma

Features

  • Color Tokens: Centralized color definitions for consistent use across the application.
  • Typography: Predefined text styles for headings, body text, captions, and more.
  • Components: Standardized UI components like buttons, labels, and views.
  • Asset Management: Easy inclusion and access to design assets like images and color sets.

Usage

Integration

To integrate the Design System package into your project, add the following dependency to your project :

https://github.com/alfian0/Design-System.git

Foundation

An overview of all available color variables

Foreground

Sample Variable Token
$${\color{#242327}Aa}$$ fg_default .foregroundDefault
$${\color{#343434}Aa}$$ fg_disabled .foregroundDisabled
$${\color{#F9F7F5}Aa}$$ fg_emphasis .foregroundEmphasis
$${\color{#A7A6A5}Aa}$$ fg_muted .foregroundMuted
$${\color{#806DFB}Aa}$$ accent_emphasis .foregroundLink
$${\color{#806DFB}Aa}$$ accent_emphasis .foregroundAccent
$${\color{#FF8E75}Aa}$$ danger_emphasis .foregroundDanger
$${\color{#CEEDFF}Aa}$$ info_emphasis .foregroundInfo
$${\color{#6DFBA6}Aa}$$ success_emphasis .foregroundSuccess
$${\color{#FFEF9B}Aa}$$ warning_emphasis .foregroundWarning

Background

Sample Variable Token
#F9F7F5 bg_default .backgroundDefault
#242327 bg_emphasis .backgroundEmphasis
#F2EFED bg_muted .backgroundMuted
#806DFB accent_emphasis .backgrounddAccentEmphasis
#EBE8FF accent_muted .backgroundAccentMuted
#FF8E75 danger_emphasis .backgroundDangerEmphasis
#FFAD9B danger_muted .backgroundDangerMuted
#CEEDFF info_emphasis .backgroundInfoEmphasis
#CEEDFF info_muted .backgroundInfoMuted
#6DFBA6 success_emphasis .backgroundSuccessEmphasis
#B8FFCE success_muted .backgroundSuccessMuted
#FFEF9B warning_emphasis .backgroundWarningEmphasis
#FFEF9B warning_muted .backgroundWarningMuted

Border

Sample Variable Token
#242327 fg_default .boderDefault
#806DFB accent_emphasis .boderEmphasis
#343434 fg_disabled .boderDisabled

Accessing Colors

Text("Listen to the best \n Podcast")
  .multilineTextAlignment(.center)
  .foregroundColor(.foregroundDefault)

Typography

An overview of all available typography variables

Weight

Sample Token
thin .notoSans(.thin, 14)
extraLight .notoSans(.extraLight, 14)
light .notoSans(.light, 14)
regular .notoSans(.regular, 14)
medium .notoSans(.medium, 14)
semiBold .notoSans(.semiBold, 14)
bold .notoSans(.bold, 14)
extraBold .notoSans(.extraBold, 14)
black .notoSans(.black, 14)

Font family

Sample Token
regular .notoSans(.regular, 14)
regular .inter(.regular, 14)

Font shorthand

Use the font declaration to set all font properties at once (font-weight, font-size, line-height, and font-family).

Sample Token
.Display.xs .Display.xs
.Display.s .Display.s
.Display.m .Display.m
.Display.l .Display.l
.Display.xl .Display.xl
.Heading.xs .Heading.xs
.Heading.s .Heading.s
.Heading.m .Heading.m
.Heading.l .Heading.l
.Heading.xl .Heading.xl
.Paragraph.xs .Paragraph.xs
.Paragraph.s .Paragraph.s
.Paragraph.m .Paragraph.m
.Paragraph.l .Paragraph.l
.Paragraph.xl .Paragraph.xl
.Label.xs .Label.xs
.Label.s .Label.s
.Label.m .Label.m
.Label.l .Label.l
.Label.xl .Label.xl

Components

Section

For You

SectionView(axis: .horizontal, title: "For You", models: [
  CardView.Model(title: "How to hack the education system?",
                              date: "6 Dec",
                              duration: "1 hr 15 min",
                              like: 1,
                              image: CardView.Model.Image(image: UIImage(named: "thumbnail_1")!, url: nil)),
  CardView.Model(title: "How to hack the education system?",
                              date: "6 Dec",
                              duration: "1 hr 15 min",
                              like: 1,
                              image: CardView.Model.Image(image: UIImage(named: "thumbnail_2")!, url: nil))
]) { model in
  CardView(model: model)
    .frame(width: 287)
}

CardView

How to hack the education system_

CardView(model: model)
    .frame(width: 287)

CardView2

Sleep sounds by nature

CardView2(model: model)
    .frame(width: 257)

Conclusion

This Design System package is a personal initiative to streamline the implementation of design systems in new projects. By using this package, you can ensure consistency, reduce design debt, and speed up the development process with a well-documented and reusable set of design assets.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0