The Flocks library module. Load this module and use either the flocks flocks.createClass wrapper or the flocks plumbing mixin to create flocks controls. Place them into your document using flocks.mount, and use the returned function or the data and method that the mixin provides, this.fctx and this.fset() respectively, to read and write to the flocks state.
And suddenly you're done.
Please see the tutorials for more information.