All Projects → IjzerenHein → Kiwi.js

IjzerenHein / Kiwi.js

Licence: other
Fast TypeScript implementation of the Cassowary constraint solving algorithm 🖖

Programming Languages

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

Projects that are alternatives of or similar to Kiwi.js

Keyboardlayoutguide
⌨️ Manage iOS keyboard with Apple's missing KeyboardLayoutGuide
Stars: ✭ 1,054 (+411.65%)
Mutual labels:  autolayout
Swiftautolayout
Write constraints in a concise, expressive, Swifty way.
Stars: ✭ 83 (-59.71%)
Mutual labels:  autolayout
Kgnautolayout
Making AutoLayout Easy
Stars: ✭ 127 (-38.35%)
Mutual labels:  autolayout
Tagflowlayout
支持多选的自定义标签View,可展开收起,标签样式可自定义。
Stars: ✭ 68 (-66.99%)
Mutual labels:  autolayout
Autolayout
Auto Layout 秘境
Stars: ✭ 1,224 (+494.17%)
Mutual labels:  autolayout
Basecomponents
BaseComponents aims to provide easily reusable and understandable components to increase productivity with UIKit and Foundation APIs
Stars: ✭ 92 (-55.34%)
Mutual labels:  autolayout
Tangramkit
TangramKit is a powerful iOS UI framework implemented by Swift. It integrates the functions with Android layout,iOS AutoLayout,SizeClass, HTML CSS float and flexbox and bootstrap. So you can use LinearLayout,RelativeLayout,FrameLayout,TableLayout,FlowLayout,FloatLayout,LayoutSizeClass to build your App 自动布局 UIView UITableView UICollectionView
Stars: ✭ 984 (+377.67%)
Mutual labels:  autolayout
Notautolayout
Layout your views without Auto Layout constraints, in a much more swifty way.
Stars: ✭ 171 (-16.99%)
Mutual labels:  autolayout
Inflaterauto
a lib that make UI look the same in different android phones, 强大的屏幕适配库(AndroidAutoLayout替代方案),不只是适配!
Stars: ✭ 81 (-60.68%)
Mutual labels:  autolayout
Flexlib
FlexLib是一个基于flexbox模型,使用xml文件进行界面布局的框架,融合了web快速布局的能力,让iOS界面开发像写网页一样简单快速
Stars: ✭ 1,569 (+661.65%)
Mutual labels:  autolayout
Screenadaptationkit
🎨iOS rapidScreen Compatible AdapterKit(Deprecate)
Stars: ✭ 70 (-66.02%)
Mutual labels:  autolayout
Visualformat Editor
Editor & previewer for Apple's Visual Format Language (built with autolayout.js)
Stars: ✭ 74 (-64.08%)
Mutual labels:  autolayout
Everlayout
Reusable, downloadable, up-datable iOS layouts
Stars: ✭ 103 (-50%)
Mutual labels:  autolayout
Framelayoutkit
FrameLayoutKit is a super fast and easy to use autolayout kit
Stars: ✭ 53 (-74.27%)
Mutual labels:  autolayout
Drawer View
📤 Custom UI component for iOS, replication of Apple's Apple Music player and Shortcuts’ components view [Swift 5.0, iOS 12].
Stars: ✭ 136 (-33.98%)
Mutual labels:  autolayout
Sketchkit
A lightweight auto-layout DSL library for iOS & tvOS.
Stars: ✭ 40 (-80.58%)
Mutual labels:  autolayout
Kvconstraintkit
An Impressive Auto Layout DSL for iOS, tvOS & OSX. & It is written in pure swift.
Stars: ✭ 91 (-55.83%)
Mutual labels:  autolayout
Panda
Panda is an asynchronous render and layout framework which can be used to achieve high performance tableview.
Stars: ✭ 177 (-14.08%)
Mutual labels:  autolayout
Devicelayout
📱AutoLayout can be set differently for each device
Stars: ✭ 170 (-17.48%)
Mutual labels:  autolayout
Albookcode
Modern Auto Layout Book Sample Code And Solutions
Stars: ✭ 106 (-48.54%)
Mutual labels:  autolayout

kiwi.js

view on npm Build Status codecov

Kiwi.js is a fast TypeScript implementation of the Cassowary constraint solving algorithm, based on the seminal Cassowary paper. Originally created by Chris Colbert, it was redesigned from the ground up to be lightweight, fast and easy to maintain. View the benchmarks to see how it compares to Cassowary.js.

Index

Getting started

Install using NPM:

npm install kiwi.js

The following example creates a solver which automatically calculates the width:

import * as kiwi from 'kiwi.js';
import { equal } from 'assert';

// Create a solver
var solver = new kiwi.Solver();

// Create edit variables
var left = new kiwi.Variable();
var width = new kiwi.Variable();
solver.addEditVariable(left, kiwi.Strength.strong);
solver.addEditVariable(width, kiwi.Strength.strong);
solver.suggestValue(left, 100);
solver.suggestValue(width, 400);

// Create and add a constraint
var right = new kiwi.Variable();
solver.addConstraint(new kiwi.Constraint(new kiwi.Expression([-1, right], left, width), kiwi.Operator.Eq));

// Solve the constraints
solver.updateVariables();
equal(right.value(), 500);

Documentation

Benchmarks

To run the benchmark in the browser, just visit this page.

To run the benchmark locally using nodejs, clone or download this repository and execute the following steps:

npm install
npm run bench

Tests

To run the tests in the browser, just visit this page.

To run the tests locally using nodejs, clone or download this repository and execute the following steps:

npm install
npm run build && npm run test

Contribute

If you like this project and want to support it, show some love and give it a star.

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].