Skip to content
This repository

A collection of re-usable views, controls & utilities for Cappuccino.

branch: master
Octocat-spinner-32 .gitignore LPKit can now be compiled properly using jake January 16, 2010
Octocat-spinner-32 Info.plist LPKit can now be compiled properly using jake January 16, 2010
Octocat-spinner-32 Jakefile symlink the correct files into narwhal, also allow passing a raw url … July 23, 2010
Octocat-spinner-32 LICENSE added license October 12, 2009
Octocat-spinner-32 LPAnchorButton.j symlink the correct files into narwhal, also allow passing a raw url … July 23, 2010
Octocat-spinner-32 LPCalendarHeaderView.j minor code cleanup in LPChartView August 11, 2010
Octocat-spinner-32 LPCalendarMonthView.j if selection length type is changed in Calendar View, reflect it in t… July 28, 2010
Octocat-spinner-32 LPCalendarView.j fix for CalendarView not drawing the grid correctly, due to a recent … September 05, 2010
Octocat-spinner-32 LPChartView.j slight formatting fix September 05, 2010
Octocat-spinner-32 LPCookieController.j make escaping cookie values optional September 22, 2010
Octocat-spinner-32 LPCrashReporter.j added autoresizing masks to cancel button in LPCrashReporter report w… March 13, 2010
Octocat-spinner-32 LPEmail.j Shouldn't be two calls to test the email pattern. Closes #2 December 06, 2009
Octocat-spinner-32 LPKit.j added missing import January 13, 2010
Octocat-spinner-32 LPLocationController.j use window.onhashchange if that is available in the LocationController June 24, 2010
Octocat-spinner-32 LPMultiLineTextField.j Added option to disable scrollbars from appearsing on overflow September 03, 2010
Octocat-spinner-32 LPPieChartView.j LPChartView should make a copy of the draw view. January 23, 2010
Octocat-spinner-32 LPSlideView.j correct ivar declaration July 27, 2010
Octocat-spinner-32 LPSparkLine.j removed leftover method in sparkline. January 29, 2010
Octocat-spinner-32 LPSwitch.j New LPViewController, with new & better API and also supports using h… June 25, 2010
Octocat-spinner-32 LPURLPostRequest.j use more sane escaping April 07, 2010
Octocat-spinner-32 LPViewAnimation.j always try to activate hardware acceleration in css animations September 21, 2010
Octocat-spinner-32 README.markdown added randy as a contributor in the readme August 19, 2010


A collection of different generic views & utilities for Cappuccino, extracted from Observer.

A demo is available at, with the source code in the LPKit-Examples repository.

LPKit requires Cappuccino 0.8.1.


Place the entire LPKit folder in your Frameworks folder, or any directory that you add using OBJJ_INCLUDE_PATHS.

What's inside

Slide view

LPSlideView lets you slide between different subviews. Only one subview will be visible, and the sliding only shows the relevant subviews - no matter how many other views might be between them.

Calendar view

calendar view

LPCalendarView is a calendar view based on the iPhone calendar app, with the same sliding when changing months. Currently supports selecting days & weeks, also marking a special day as highlighted - such as the current day or week.


calendar view

A fully customizable chart view that can be used to implement either Bar or Line charts.


calendar view

A fully customizable pie chart view.



A simple sparkline chart, comparable to the Google Chart sparklines - but using CoreGraphics rather than an image.

Switch control

switch control

A port of the UISwitch from the iPhone SDK, with the same behavior and feel.

Anchor Button

A control which can either simulate anchors, or if provided with a CPURL creates an anchor element. Useful for creating hyperlinks.



A simple object which lets you validate emails, for now. NOTE: the current regexp is broken, needs to be replaced with one that actually works.


A wrapper around CPURLRequest to make working with post requests a bit simpler. Rather than manually settings the HTTPBody & Content-Type, you pass it a javascript object with key value pairs of strings which you want to send as a POST request.


var request = [LPURLPostRequest requestWithURL:[CPURL URLWithString:@"/my-url/"]],
    content = {
                  'name': 'Lorem ipsum',
                  'age': '18'

[request setContent:content]
[CPURLConnection connectionWithRequest:request delegate:self];


A utility class to work with document.cookie, without the tedious stuff.


var cookieController = [LPCookieController sharedCookieController];

// Set a session, which will be deleted when the browser closes.
[cookieController setValue:@"My value" forKey:@"MyKey"];

// Set a cookie which won't be flushed
[cookieController setValue:@"My value" forKey:@"MyOtherKey" expirationDate:[CPDate distantFuture]];

// Get the value of the session
console.log('value for MyKey: ' + [cookieController valueForKey:@"MyKey"]);


LPKit makes heavy use of the theme API in Cappuccino. An example on how to use themes with LPKit is available in in the LPKit-Examples repository which has a demo theme with an Aristo inspired look.


Something went wrong with that request. Please try again.