Create & Add Your Own Components in the Sandbox

At ProtoShare, we strongly believe in low-fidelity wireframes and prototypes. After all, wireframes aren’t the end goal, they are merely a tool to use in a larger process. Most of the time, simple wireframes kickstart the needed discussion to make decisions. There are times, however, when simple doesn’t cut it. Sometimes you need to build out a specific feature more completely to adequately experience and discuss it. At these times, wireframing applications turn into limitations because you can only build what their component palettes allow you to build. That is if you aren’t using ProtoShare and the HTML Sandbox.

The ProtoShare front-end is all HTML/JavaScript, not Flash. Consequently, this allows users to do some unique things, like view the prototype in a browser, or use CSS to change the appearance of components. Now with the HTML Sandbox, ProtoShare gives you the ability to create and add any component they can think up and code. And with the proliferation of JavaScript libraries like Ext (which we use to build ProtoShare), YUI, jQuery, mooTools, etc it is not too much work to find a pre-built component and modify it to fit your needs.

The video below shows some of the possibilities you now have with the Sandbox:


So, how does it work? The HTML Sandbox is currently under our “Experimental” components at the bottom of the palette in the editor. Select it like any other component, click the Source Code field in the properties to open the HTML editor, and type or paste in your code. Close the HTML editor and switch back to Prototype mode, or click the Interactive Mode button and check it out.

Below is some sample code you can use to test it. This is a very simple example of doing a basic on-the-fly form validation where it highlights blank entries.

  1. <script type=“text/javascript”</code>
  2. src=””>
  3. <style type=“text/css”>
  4. .error { background-color: #FFD2D2; }
  5. div, input { font-size:11px; font-family:Verdana; padding:5px; }
  6. input { padding:2px; border:1px solid black; }
  7. </head>
  8. <form name=“user” action=“#” onsubmit=“return false;”>
  9. <div>Name <input type=“text” id=“name”/> <span></span></div>
  10. <div>Email <input type=“text” id=“email”/> <span></span></div>
  11. <div><input type=“submit” value=“Submit” /></div>
  12. </form>
  13. <script type=“text/javascript”>
  14. $(‘input’).blur( function() {
  15. if( $(this).val() == ” ) {
  16. $(this).parent().addClass( ‘error’ );
  17. $(this).next(‘span’).html(‘ this cannot be blank’);
  18. } else {
  19. $(this).parent().removeClass( ‘error’ );
  20. $(this).next(‘span’).html(”);
  21. }
  22. });
  23. $(‘form’).submit( function() {
  24. $(‘#name’).blur();
  25. $(‘#email’).blur();
  26. });
  27. </body>
  28. </html>

Notice in this example we’re using the jQuery library hosted on If you want to use some jQuery (or other JavaScript library) plugin you find, there will probably be additional files necessary. You can either paste the source code into the HTML editor, or you can upload the files to the Asset Library and link to them.

You upload JavaScript and CSS files to the Asset Library just as you would any image asset. Once the files are uploaded, click on a file to see the full path to the file. These links take the form of /Asset/<directory>/<file>. For example if I were going to use a jQuery library called accordion.js, I would upload it to the Asset Library and my HTML Sandbox code would look something like this:

  1. <script type=“text/javascript”
  2. src=“”>
  3. <script type=“text/javascript” src=“/Assets/js/accordion.js”></script>
  4. </head>

Please remember this is still an experimental component. We consider this an advanced component as you need to know a fair amount about HTML and JavaScript to get the most out of it. We’re very excited about the possibilities here, and we think you’ll be too. We’d also like to hear your thoughts about the HTML Sandbox. Please leave us some comments here describing how you are using it, or how you would like to use it.

This entry was posted in ProtoShare Workflows. Bookmark the permalink.

Previous post:
Next post:

Leave a Reply

Your email address will not be published. Required fields are marked *