Swift
Latest commit 3cec253 May 19, 2017 @eonist Files modified: 1

Modified 1 file:
src/Element/ui/treelist/utils/tree/utils/TreeUtils.swift
Permalink
Failed to load latest commit information.
src/Element Files modified: 1 May 19, 2017
Package.swift update Feb 6, 2017
README.md Files modified: 1 May 12, 2017

README.md

MIT Status platform Lang SPM  compatible codebeat Build Status

What is it?

Independent UI framework with zero AppKit dependencies. Element lets you add rich UI interaction to your app.

img

How does it work?

A typical Element app consists of 90% Swift code and 10% CSS and SVG. CSS Handles design and alignment and swift handles functionality and animation.

img

Installation:

  • Read This tutorial on how to start a new App project from Swift Package Manager.
  • Add this to your Package.swift file
import PackageDescription
let package = Package(
    name: "AwesomeApp",
    dependencies: [
	   .Package(url: "https://github.com/eonist/Element.git", Version(0, 0, 0, prereleaseIdentifiers: ["alpha", "5"]))
    ]
)
  • In AppDelegate.swift add this to the top @testable import Element and this inside the applicationDidFinishLaunching method:
StyleManager.addStyle("Button{fill:blue;}")
let btn = Button(100,20)
window.contentView = FlippedView()/*TopLeft orientation*/
window.contentView?.addSubview(btn)
btn.event = { event in
   if(event.type == ButtonEvent.upInside){Swift.print("hello world")} 
}

You can also compile Element as a regular .framework instructions here

Resources:

  • Simple example app made with Element: Stash
  • Library of example code for each component in Element: Explorer
  • Default macOS styles to get you started: ElCapitan

iOS:

Element for πŸ“± is in the works here
img

Progress:

2017-apr

  • FastTreeList is introduced

2017-mar

  • List UI's are now POP (aka Protocol Oriented Programming)
  • Elastic, Slidable and Scrollable protocols are introduced
  • Converting from OOP to POP (aka shared inheritance) Aka no duplicate code!

2017-feb

  • Improvements to SliderTreeList
  • Fixed slider positioning in sliderTreeList
  • Fixed margin error in TreeList
  • Significant improvements to RBSliderFastList, SliderFastList and FastList

MileStones:

  • FlexBox support
  • FastTreeList component βœ…
  • Faster CSS caching algorithm

More...

More about Element πŸ‘‰ wiki

Support

Please, don't hesitate to file an issue if you have questions.

Sponsors:

img