Coder Social home page Coder Social logo

zxj1989 / figmaconvertxib Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mrustaa/figmaconvertxib

0.0 0.0 0.0 6.88 MB

๐ŸŽจ๐Ÿ“ฒโœจ๐Ÿง‘โ€๐Ÿ’ป Figma Convert to .xml / .xib ๐Ÿ“ โœ‚๏ธ copy ui ๐Ÿ‘Œ is a tool for exporting design elements from figma.com and generating files to a projects iOS .xib / Android .xml

Java 4.06% Swift 95.94%

figmaconvertxib's Introduction

image(Landscape)

FigmaConvertXib/Xml

FigmaConvertXib is a tool for exporting design elements from Figma and generating file to a projects

.Xib iOS Xcode / .Xml Android-Studio .

Preview

image(Landscape)

Watch video with examples

โ–ถ๏ธ Add Figma Projects

โ–ถ๏ธ Page Types

Installation:

Base parameters

Each step of generation is using the following base parameters:

  • accessToken: an access token string that is needed to execute Figma API requests (see Figma access token).
  • project id: URL of a Figma file, which data will be used to generate code (see Figma file).

Figma access token

Authorization is required to receive Figma files. The authorization is implemented by transferring a personal access token. This token could be created in a few simple steps:

  1. Open account settings in Figma.
  2. Press "Create a new personal access token" button in the "Personal Access Tokens" section.
  3. Enter a description for the token (for instance, "FigmaConvertXib").
  4. Copy the created token to the clipboard.

Then Compile / Run the project FigmaConvertXib.xcodeproj and paste the received access Token in the accessToken field. It is enough to define it only in the base section if this token allows access to all Figma files, which appear in the configuration.

Add Figma project id

Open the URL figma project, and copy its project-id Then open the application, click button-plus, and paste the received project-id

Complection Generation Xib Xml to projects Xcode Android

Xcode

  • Open project FigmaConvertXib.xcodeproj
  • And go to folder / Figma / Xib / result_ios.xib

Android-Studio

  • Open project FigmaConvertAndroidXml
  • And go to folder / app / res / layout / result_android.xml

image(Landscape)

Currently supports the following entities:

Nodes

  • โœ… iOS (View / Layer) | Android (ConstraintLayout)
    • Rectangle
    • Frame
    • Page
    • Group
  • โœ… iOS | Android (ImageView)
    • Image Fill
    • Component
  • โœ… iOS (Label) | Android (TextView)
    • Text
  • โœ… Vector
    • Ellipse
    • Polygone
    • Star
  • โŒ Vector
    • Line
    • Line Arrow
    • Curves

Fills

  • โœ… Solid
    • Images
    • Gradient Linear
    • Gradient Radial
  • โŒ Gradient Angular
    • Gradient Diamond

Effects

  • โœ… (Only in iOS)
    • Shadow Inner
    • Shadow Drop
    • Blur Layer
  • โŒ Blur Background

Export vector icons

In order to export vector-icons in Figma, ัƒou need to select vector layers and click create component.

Will begin downloading images.

  • / Figma / Xib / images.xcassets
  • / app / res / drawable

In .xib .xml it will be generated into an ImageView

image(Landscape)

Author

[email protected] ๐Ÿ“ฉ| mrustaa FEBRUARY 2021

License

FigmaConvertXib is available under the MIT license. See the LICENSE file for more info.

figmaconvertxib's People

Contributors

mrustaa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.