# wix-ui-lib **Repository Path**: mirrors_urish/wix-ui-lib ## Basic Information - **Project Name**: wix-ui-lib - **Description**: Starter Kit for Wix 3rd Party Apps - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-26 - **Last Updated**: 2026-05-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # UI Library: Starter Kit for Wix 3rd Party Apps ## About This project is aimed at helping developers in the process of getting new apps to Wix Dev Center as quickly as possible. The UI in this project focuses on the App's Settings Panel. The boilerplate offers UI standards and common Javascript components to assist the developer in passing Product tests, and in developing a consistent and uniformed UI for the app. ##### Click here for demo and documentation. ## Structure & Standards #### App Intro First, make an introduction. *This is compulsry according to Wix Apps product style guide.* ###### HTML
You can simply paste your app icon in the CSS `.logo` class: ###### CSS .intro .icon .logo { border-radius: 15px; height: 100%; width: 100%; background: url('../../images/wix_icon.png') center; } Or, if you're using the precompiled Less sources, neatly nested in the `.intro` block, is the `.logo` class. ###### Less (precompiled) .intro { .logo { // … background: url('@{images}/wix_icon.png') center; } } #### Guest & User Once your app is running, an **authenticated user mode** should come in handy. Under the `.intro` block you'll find two sections: `.guest` and `.user`. Switch the `.hidden` class between the two to accompany each these state in the app, respectively. Guests will see the **App Intro**, a **Connect Button**, and a **Text Link** for creating a new account. ###### Guest

Authenticated users will see the details of their **Session Details** (User name, e-mail etc) and a **Text Link** for disconnecting the session. ###### User If this is irrelevant to your project, simply remove this markup. #### Box (Container) Box is the basic container for Wix 3rd Party Settings panel. Boxes are for grouped controls or information blocks. Use them as you like!

Checkboxes

Feature description

Boxes also contain the `.feature`, which styles a simple paragraph for textual information. #### List To group different controls in horizontal view, you can use the `.list` class and structure: This is a simple list with the proper CSS styling to contain all the HTML and JS components offered in the starter kit and present them in a neat horizontal row. #### Layouts Picker
Layout 1
Layout 2
Layout 3
## Javascript Components The starter kit Javascript components are basically a set of [jQuery][jquery] Plugins. [jquery]: http://jquery.com/ #### Accordion ##### Usage

Title

// content goes here
Set the Accordion parameters in `accordion.js`. In this case, `box` defines the Wrapper Class, and `feature` defines the content wrapper. { triggerClass : "box", contentClass : "feature" } Initialize the Accordion in `settings.js`: $('.accordion').Accordion(); #### Color Picker ##### Usage Add the following HTML Markup Include [Twitter Bootstrap][bootstrap] components `Tooltip` and `Popover` dependencies in your main HTML file Next, initialize your color picker on DOM ready like so: $('.color-selector').ColorPicker({startWithColor : 'red'}); To subscribe to color-change event: $(document).on("colorChanged", function event , data) { // data.type now has the id of the color-picker (in case you have more than one // data.selected_color has the selected color ('#ffffff' for example) }); [bootstrap]: http://twitter.github.com/bootstrap/ #### Radio Button ##### Usage Add a radio button group to your HTML file:

Option 1

Option 2

Option 3

Initialize the button group and decicde which button is `checked`. $('.radiobuttons').Radio({ checked: 0 }); To subscribe to value-change event: $(document).on("radioButton.change", function (event, data) { // data.type now has the id of the selected option // data.checked is true }); ##### Nested Radio Buttons This is another use case for radio buttons, implemented in the Layout Picker structure:
Layout 1
Layout 2
Layout 3
Next, you specifiy the nested element (`el`) of the radio button: $('.layouts').Radio({el: "figure figcaption", checked: 1}); Note — `.boxes`, `.full` and `.grid` relate to `backgorund-position` of the layout sprite (See `images/layouts.png`): ![Wix](https://dl.dropbox.com/u/427838/ui-lib/images/layouts.png) #### Checkbox ##### Usage Add a checkbox:

Checkbox 1

Initialize checkbox, specifying `checked`: $('#checkbox1').Checkbox({ checked: true }); To subscribe to value-change event: $(document).on("checkbox.change", function (event, data) { // data.type now has the id of the changed checkbox // data.checked is whether the checkbox is checked or not }); #### Slider ##### Usage Add the slider markup, a simple `div` would do.
0
100
Initialize the Slider component with a value. $('.slider').Slider({ type: "Value", value: 0.5 }); ## Less.js The starter kit stylesheets are compiled from LESS sources. If you are not familiar with LESS you can find more information [here][lessjs]. [lessjs]: http://mouapp.com "Markdown editor on Mac OS X" ## License Copyright (c) 2012 Wix.com, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.