All Projects → bernaferrari → Figmatocode

bernaferrari / Figmatocode

Licence: gpl-3.0
Generate responsive pages and apps on HTML, Tailwind, Flutter and SwiftUI.

Programming Languages

typescript
32286 projects
Svelte
593 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Figmatocode

memento-svelte-electron-typescript
Template to create a desktop app with Svelte, TailwindCSS, Electron and TypeScript (with electron-updater, electron-reload and electron-builder)
Stars: ✭ 27 (-98.83%)
Mutual labels:  svelte, tailwind, tailwindcss
kickstart
Ruby on Rails application templates
Stars: ✭ 61 (-97.35%)
Mutual labels:  svelte, tailwind, tailwindcss
gridsome-starter-liebling
Gridsome starter based on the Liebling theme for Ghost. Content is added via markdown, while Tailwind CSS is used for the layout/styling.
Stars: ✭ 21 (-99.09%)
Mutual labels:  responsive, tailwind, tailwindcss
svelte-tailwind-snowpack
TailwindCSS with Svelte and Snowpack v3
Stars: ✭ 100 (-95.65%)
Mutual labels:  svelte, tailwind, tailwindcss
EddieHubCommunity.github.io
Information about our community
Stars: ✭ 88 (-96.17%)
Mutual labels:  svelte, tailwind, tailwindcss
Sapper Ecommerce
Svelte ecommerce - Headless, Authentication, Cart & Checkout, TailwindCSS, Server Rendered, Proxy + API Integrated, Animations, Stores, Lazy Loading, Loading Indicators, Carousel, Instant Search, Faceted Filters, 1 command deploy to production, Open Source, MIT license. Join us as contributor ([email protected])
Stars: ✭ 289 (-87.43%)
Mutual labels:  tailwindcss, svelte
Twin.macro
🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, stitches and goober) at build time.
Stars: ✭ 5,137 (+123.44%)
Mutual labels:  tailwindcss, tailwind
Smelte
UI framework with material components built with Svelte and Tailwind CSS
Stars: ✭ 871 (-62.11%)
Mutual labels:  tailwindcss, svelte
Pingcrm Svelte
🦊 Ping CRM Svelte - A demo app to illustrate how Inertia.js works with Laravel and Svelte (hosted on a heroku free dyno).
Stars: ✭ 74 (-96.78%)
Mutual labels:  tailwindcss, svelte
Figma-Vue3-Template
Plugin template for Figma using Vue3
Stars: ✭ 19 (-99.17%)
Mutual labels:  figma, figma-plugins
Sapper Template Firebase
Starter Rollup template for Sapper apps with Firebase functions based on https://github.com/nhristov/sapper-template-rollup.
Stars: ✭ 29 (-98.74%)
Mutual labels:  tailwindcss, svelte
Universal Resume
Minimal and formal résumé (CV) website template for print, mobile, and desktop. https://bit.ly/ur_demo
Stars: ✭ 1,349 (-41.32%)
Mutual labels:  responsive, tailwindcss
Next-JS-Landing-Page-Starter-Template
🚀 Free NextJS Landing Page Template written in Tailwind CSS 3 and TypeScript ⚡️ Made with developer experience first: Next.js 12 + TypeScript + ESLint + Prettier + Husky + Lint-Staged + VSCode + Netlify + PostCSS + Tailwind CSS
Stars: ✭ 521 (-77.34%)
Mutual labels:  tailwind, tailwindcss
cra-tailwindcss
Integrate Tailwind CSS in a Create React App setup
Stars: ✭ 105 (-95.43%)
Mutual labels:  tailwind, tailwindcss
Awesome Tailwindcss
😎 Awesome things related to Tailwind CSS
Stars: ✭ 7,791 (+238.89%)
Mutual labels:  tailwindcss, tailwind
sapper-template-rollup
Starter Rollup template for Sapper apps using postcss, cssnano, tailwindcss, and svelte-preprocess.
Stars: ✭ 32 (-98.61%)
Mutual labels:  svelte, tailwindcss
Beamwind
a collection of packages to compile Tailwind CSS like shorthand syntax into CSS at runtime
Stars: ✭ 32 (-98.61%)
Mutual labels:  responsive, tailwindcss
Sapper Firebase Typescript Graphql Tailwindcss Actions Template
A template that includes Sapper for Svelte, Firebase functions and hosting, TypeScript and TypeGraphQL, Tailwind CSS, ESLint, and automatic building and deployment with GitHub Actions
Stars: ✭ 111 (-95.17%)
Mutual labels:  tailwindcss, svelte
Tailwindcss
A utility-first CSS framework for rapid UI development.
Stars: ✭ 50,879 (+2113.09%)
Mutual labels:  responsive, tailwindcss
React Figma
⚛️ A React renderer for Figma
Stars: ✭ 1,830 (-20.4%)
Mutual labels:  figma, figma-plugins

Figma to Code

Figma to Code

Twitter

Most design to code plugins are bad, some are even paid. This project aims to raise the bar by generating responsive layouts in Tailwind, Flutter and SwiftUI. The plan is to eventually add support for Jetpack Compose and possibly standard HTML or other frameworks like React Native, Bootstrap or Fluent. Feedback, ideas and partnerships are appreciated!

Gif showing the conversion

How it works

This plugin takes an unconventional approach to improve code quality: it optimizes the layout before the conversion to code even begins. The standard Figma Nodes (what represents each layer) is a joy to work with, but it can't modify a layer without modifying the user project. For this reason, I decided to virtualize it, remaking the official implementation and naming them AltNodes. During the process of converting a Node into an AltNode, the plugin does the following:

Conversion Workflow

That process can also be seen as an Intermediate Representation and might allow this plugin to, one day, live outside Figma.

Hard cases

When finding the unknown (a Group or Frame with more than one child and no vertical or horizontal alignment), Tailwind mode uses insets for best cases and left, top from standard CSS for the worst cases. Flutter mode uses Stack and Positioned.fill. Both are usually not recommended and can easily defeat the responsiveness. In many scenarios, just wrapping some elements in a Group or Frame can solve:

Conversion Workflow

Tip: Instead of selecting the whole page, you can also select individual items. This can be useful for both debugging and componentization. For example: you can use the plugin to generate the code of a single element and then replicate it using a for-loop.

Todo

  • Vectors (tricky in HTML, unsupported in Flutter)
  • Images (they are local, how to support them?)
  • Line/Star/Polygon (todo. Rectangle and Ellipse were prioritized and are more common)
  • The source code is fully commented and there are more than 30 "todo"s there

Tailwind limitations

  • Width: Tailwind has a maximum width of 384px. If an item passes this, the width will be set to w-full (unless it is already relative like w-1/2, w-1/3, etc). This is usually a feature, but be careful: if most layers in your project are larger than 384px, the plugin's result might be less than optimal.

Flutter limits and ideas

  • Stack: in some simpler cases, a Stack could be replaced with a Container and a BoxDecoration. Discover those cases and optimize them.
  • Material Styles: text could be matched to existing Material styles (like outputting Headline6 when text size is 20).
  • Identify Buttons: the plugin could identify specific buttons and output them instead of always using Container or Material.

How to build the project

The project is configured to be built with Webpack or Rollup. The author couldn't find a way to correctly configure Svelte in Webpack, so Rollup was added. But Rollup is a lot less stable than Webpack and crashes regularly in watch mode when editing Typescript files. So, if you are going to work with Typescript only, I recommend sticking with Webpack. If you are going to make changes in the UI, you need to use Rollup for now.

Issues

The Figma file for this README and icon is also open and welcome to changes! Check it here.

I took decisions thinking about how it would benefit the majority of people, but I can (and probably will!) be wrong many times. Found a bug? Have an idea for an improvement? Feel free to add an issue or email me. Pull requests are also more than welcome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].