• Stars
    star
    858
  • Rank 53,134 (Top 2 %)
  • Language
    Swift
  • Created over 9 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Programmatic UI for macOS

MIT Status platform Lang SPM  compatible codebeat badge

StyleKit - UI framework for OSX | Product Hunt

Description:

Programmatic UI Framework for macOS. Swift handles app logic, CSS/SVG handles design and JSON handles struture.

img

Installation:

Step 1: Add this to your Package.swift Tutorial

import PackageDescription
let package = Package(
    name: "AwesomeApp",
    dependencies: [
	   .Package(url: "https://github.com/eonist/Element.git", Version(0, 0, 0, prereleaseIdentifiers: ["alpha", "5"]))
    ]
)

Step 2: In AppDelegate.swift add this to the top @testable import Element and @testable import Utilsand this inside the applicationDidFinishLaunching method:

StyleManager.addStyle("Button{fill:blue;}")
let btn = Button(100,20)
let window = NSApp.windows[0]
window.contentView = InteractiveView()/*TopLeft orientation*/
window.contentView?.addSubview(btn)
btn.addHandler(.upInside) = { (event:ButtonEvent) in
   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

More...

More about Element 👉 wiki

Sponsors:

img

More Repositories

1

How-to-collaborate-on-github

A mini book about collaborating on GitHub
382
star
2

Summon

Summon a person to your exact location in a building
Swift
265
star
3

my-swift-projects

An overview of my most relevant open-source projects on GitHub
Swift
263
star
4

FileWatcher

Monitoring file system changes in macOS
Swift
219
star
5

HybridCamera

Video and photo camera for iOS
Swift
208
star
6

FlowLayout

Bi-directional layout framework for iOS
Swift
180
star
7

GitSync

A minimalistic Git client for Mac
Swift
97
star
8

Popover-label

Popover label for iOS
Swift
46
star
9

AnimLib

Animation framework
Swift
28
star
10

Element-iOS

Programmatic UI framework for iOS
Swift
24
star
11

GitSync-applescript

Automate routine git tasks with AppleScript
AppleScript
19
star
12

ThemePark

Theme library for iOS
Swift
17
star
13

Spatial

Hasle-free AutoLayout (MacOS / iOS)
Swift
16
star
14

With

Manipulate an object with a closure
Swift
16
star
15

DrawLab

A vector app that rethinks how we draw graphics
14
star
16

explorer-legacy

Showcase app for programatic UI compoents
Swift
12
star
17

FlexBox

FlexBox for swift
Swift
12
star
18

TestRunner

Simplifies running UI-tests 🏃
Swift
11
star
19

ResourceHelper

Enables you to use .bundle and other resources with SPM Unit-tests
Swift
11
star
20

DarkMode

🔦 DarkMode made simple
Swift
11
star
21

FileStreamer

Continuous data to disk
Swift
9
star
22

GraphicKit

Simplifies Drawing vector graphics to view
Swift
8
star
23

applescripts

General applescript utils
AppleScript
8
star
24

TrigKit

Trigonometry
Swift
8
star
25

NSLabel

Bring UILabel to macOS
Swift
7
star
26

SimpleTimer

Timer with regular callbacks
Swift
7
star
27

TreeListComponent

TreeList UI Component for OSX in Swift
Swift
7
star
28

ParallelLoop

💞 Parallel + functional operations in swift
Swift
7
star
29

UITestSugar

Sugar for UITesting
Swift
6
star
30

Celestial

A delightful weather app
Swift
6
star
31

Iterator

Array Iterator that can also be used with async tasks
Swift
6
star
32

FileSugar

File util
Swift
6
star
33

ZoomSwitcherKit

ZoomSwitcher for different iPhones
Swift
5
star
34

PaginationTable

Example of how pagination in a table works
Swift
5
star
35

ResultSugar

Sugar for Result
Swift
5
star
36

TimeAnimator

A simple animation framework
Swift
5
star
37

DeviceModelName

Returns the apple device as an enum
Swift
5
star
38

UXUI

Programatic UI library for MacOS
Swift
5
star
39

TableCellGuide

Content guide for TableCell
Swift
5
star
40

ClipboardSugar

Sugar for clipboard
Swift
5
star
41

CommentStyler

Converts JS-style comment blocks to Obj-c style comment blocks
Swift
4
star
42

BinarySearch

BinarySearch methods
Swift
4
star
43

PaginationService

A mock api to simulate pagination (for UITables etc)
Swift
4
star
44

UserDefaultSugar

UserDefault sugar
Swift
4
star
45

CellHider

🙈 Hide cells in UITableView
Swift
4
star
46

WizardHelper

🧙‍♂️Crossplatform-save-file-wizard for iOS and macOS
Swift
4
star
47

Cube

Convert perspective square to perspective cube
Swift
4
star
48

Research

Research
HTML
4
star
49

ReusableCell

ReusableCell
Swift
4
star
50

ProgressIndicator

A progress indicator
Swift
4
star
51

FileHasher

Hashing of files (fast) 🧬
Swift
4
star
52

ArraySugar

Sugar for array
Swift
4
star
53

CommonCell

Commonly used table cells
Swift
4
star
54

JSONSugar

Json sugar
Swift
4
star
55

CallBackButton

UIButton that has callback
Swift
4
star
56

eonist.github.io

blog
SCSS
4
star
57

EventLib

Event framework
Swift
3
star
58

ViewSugar

UIView sugar
Swift
3
star
59

CardTable

Organizes TableView in cards
Swift
3
star
60

NetworkSugar

Networking sugar
Swift
3
star
61

BinarySequencer

🧬 Sequence all possible combination of true and false
Swift
3
star
62

RefreshControlKit

A table refresh control
Swift
3
star
63

ImageSugar

UIImage sugar
Swift
3
star
64

StarterKit

StarterKit for setting up viewcontrollers
Swift
3
star
65

SqliteEdit

Edit SQLite databases in OSX
AppleScript
3
star
66

RichContextMenu

Rich context menu
Swift
3
star
67

hierarchical-spatial-algo

hierarchical spatial algo
Swift
2
star
68

NumberSugar

Sugar for numbers
Swift
2
star
69

TimeMeasure

⏱ Measure time consumed by a closure
Swift
2
star
70

GeomKit

Sugar for Geom
Swift
2
star
71

DateSugar

Date sugar
Swift
2
star
72

RegExpLib

RegEx utils
Swift
2
star
73

GestureHUD

Debugs gestures by visualizing the touch points (MacOS)
Swift
2
star
74

Issues

Issues
2
star
75

ReflectionLib

Reflection Utils
Swift
2
star
76

Carousel

merry-go-round for views
Swift
2
star
77

StringSugar

Sugar for string
Swift
2
star
78

EditTableView

Example of how to make EditTableView
Swift
1
star
79

RegExSugar

Sugar for regex
Swift
1
star
80

KeychainSugar

Sugar for keychain
Swift
1
star
81

SegueDemo

Programatic UIViewController transitions
Swift
1
star
82

EventKit

Closure based Event library
Swift
1
star
83

CueKit

🚂 Interruptible queuing system for closures
Swift
1
star
84

MathKit

Math Utils
Swift
1
star
85

NSSwitch

Switch for macOS (similar to UISwitch for iOS)
Swift
1
star
86

CircularGraph

Circular graph library
Swift
1
star
87

Unfold

Unfold UIKIT components from JSON
Swift
1
star
88

XMLLib

XML Utils
Swift
1
star
89

ColorLib

Color Utils
Swift
1
star
90

switch

Swift
1
star
91

NetSki

Sugar that makes swift networking less cumbersome
Swift
1
star
92

ShellSugar

Sugar for Shell
Swift
1
star
93

AnimButton

Animation button
Swift
1
star
94

RangeSugar

Sugar for range
Swift
1
star
95

MDHelper

A minimal task menu app
Swift
1
star
96

SimpleTable

A simple row based table (iOS)
Swift
1
star