Reid Burke of IdeaRefuge writes in with a new YUI implementation that tweaks the standard “stacked” spatial orientation of a tab control and replaces with a scrolling orientation (either horizontal or vertical). In his own words:
I’ve created a YUI addon, ScrollTabView, that allows you to transition
between TabView content with a Scroll animation.This allows you to use YUI’s tabs to create an effect similar to:
You can specify your own direction (horizontal or vertical), animation
duration, and easing as attributes. Complicated styles are all applied
automatically — just use it like a normal TabView.View examples of ScrollTabView in action and grab the code here.
Direct links to examples and code:
- http://internal.reidburke.com/yui-addons/yodeler/widget/ScrollTabView.js
- http://internal.reidburke.com/yui-addons/yodeler/examples/ScrollTabView/horizontal.html
- http://internal.reidburke.com/yui-addons/yodeler/examples/ScrollTabView/vertical.html
- http://internal.reidburke.com/yui-addons/yodeler/examples/ScrollTabView/easing.html
- http://internal.reidburke.com/yui-addons/yodeler/examples/ScrollTabView/quick.html
It’s all available under a BSD License — so feel free to use it for
your own projects!
Reid’s work builds on top of Matt Sweeney’s YUI TabView Control and Animation Utility.
May 21, 2008 at 6:03 am
Very nice idea!
It is possible to get width and height from DOM
like this..?
hhh = document.getElementById(“canvas”).offsetheight;
www = document.getElementById(“canvas”).offsetwidth;
ScrollTabView(‘canvas’, { width: www, height: hhh, direction: ‘horizontal’ });
Many thanks,
Thomas
May 21, 2008 at 2:25 pm
[...] Update: I’ve been featured on the official YUI Blog! [...]
May 22, 2008 at 8:18 am
Thomas,
That should be possible. This initial version focuses on letting ScrollTabView handle the styling instead of relying on other CSS.
That’s something I’d like to improve on– being able to detect the styles if you don’t specify them. Until then, your workaround should work. Just make sure you use offsetHeight and offsetWidth, not offsetheight and offsetwidth.
-Reid
May 22, 2008 at 2:44 pm
[...] received a great response from the community about my ScrollTabView addon. I’d like to thank all of the visitors and [...]
May 23, 2008 at 1:31 pm
[...] Reid Burke’s Scrolling TabView » Yahoo! User Interface Blog Nice tab navigation effects (tags: interface:concepts interface:ajax) [...]