Skip to Content
Author's profile photo MANOJ KUMAR

CSS Tips & Tricks: Sliding Panel Transition in SAP Design Studio

Introduction

A sliding panel transition can be a really good solution for someone looking to save on dashboard real estate. Sliding it in and out of view with butter-smooth transitions on demand presents a very compelling case when it comes to dashboard aesthetics – it’s fast, can be easily animated, and it’s something users are used to seeing on SAP Design Studio dashboards.

What is a slide panel?

The slide-out panel, using CSS3 transitions, promotes efficient use of space on a dashboard. When used as a navigation panel, users can choose to reveal the panel on-demand. Transitions give an aesthetic appeal to the panel, constituting a good look-and-feel along with functionality.

How to create the slide panel using CSS3:

1) Insert a panel in the application and set its layout attributes as required.

panel in SAP Design Studio

2) Insert a Grid Layout inside the panel and set its layout attributes as required. All components to be shown in the navigation panel are to be contained in the Grid Layout (it is preferable to set the width of the Grid Layout to an absolute value to ensure that the transition works seamlessly).

Grid layout in SAP Design Studio

3)  Save the CSS script given below as a separate style sheet (Create a notepad file and save it as <name>.css).


.slideout {
  position: fixed;
  top: 42px;
  left:0;
  width: 35px;
  padding: 12px 0;
  text-align: center;
  background: #fdcb03;
  -webkit-transition-duration: 0.3s;
  -moz-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -o-transition-duration: 0.3s;
  -webkit-border-radius: 0 5px 5px 0;
  -moz-border-radius: 0 5px 5px 0;
  border-radius: 0 5px 5px 0;
  cursor:pointer;
  height:90% !important;
 }
 .slideout_inner {
  position: fixed;
  top: 42px;
  left: -300px;
  height:93% !important;
  background: #000000;
  padding: 25px;
  -webkit-transition-duration: 0.3s;
  -moz-transition-duration: 0.3s;
  transition-duration: 0.3s;
  -o-transition-duration: 0.3s;
  text-align: left;
  -webkit-border-radius: 0 0 5px 0;
  -moz-border-radius: 0 0 5px 0;
  border-radius: 0 0 5px 0;
 }
 .slideout:hover, .slideout:focus {
  left: 300px;
 }
 .slideout:hover .slideout_inner, .slideout:focus .slideout_inner {
  left: 0;
 }

4) Now insert a Text Box with the layout attributes similar to that of the panel, and width as an absolute value – around 10px. Insert the CSS tags/attributes given below under the CSS Style property of the Text Box:



filter:flipv fliph;
 writing-mode:tb-rl;
 color:#333333;
 font-size:14px;
 text-align:center;
 height:90%;

5) Upload the CSS file using the application’s properties (Properties View), and set the CSS classes as follows:

  • Panel -> ‘slideout’
  • Grid Layout -> ‘slideout_inner’

The application should now look like this:

CSS in SAP Design Studio

What are the advantages of having a Slide-Out Panel using CSS?

1) Responsive on all devices and all browsers (10+ for ie and all latest versions)

2) Much faster transitions

3) Light weight animation

4) Access filters/navigation on demand, without wasting or disturbing the layout of the dashboard.

source: http://visualbi.com/blogs/design-studio/design-studio-tips-and-tricks/css-sliding-panel-transition-sap-design-studio/

Assigned Tags

      10 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo James Rapp
      James Rapp

      Hi Manoj,

      Nice post ... just to confirm, you aren't setting any CSS classes dynamically with an on-click event for these panels? Can you explain a bit more about how this works behind the scenes?

      Author's profile photo Michael Howles
      Michael Howles

      He is using :hover selectors.

      I wonder if this breaks on Mobile devices or if :hover would register on tap. Hmm.

      Author's profile photo MANOJ KUMAR
      MANOJ KUMAR
      Blog Post Author

      Hi michael Howles,

      It works fine in ipad by using focus property. The UI animation looks good in ipad  as well.

      Author's profile photo Michael Howles
      Michael Howles

      Thanks for letting me know.  I'll probably incorporate this into a few things then for sure.

      Thank you for sharing.

      Author's profile photo MANOJ KUMAR
      MANOJ KUMAR
      Blog Post Author

      Hi James,

      Thanks , i achieved slide panel by using hover and focus. its work fine mobile devices as well by using focus like on-click property.

      Author's profile photo James Rapp
      James Rapp

      Nice one Manoj ... thanks for the follow-up!

      Author's profile photo Former Member
      Former Member

      Thanks for Sharing Mr. Manoj

      Author's profile photo Selvarasan Subramanian
      Selvarasan Subramanian

      Nice option !

      Author's profile photo MANOJ KUMAR
      MANOJ KUMAR
      Blog Post Author
      Author's profile photo Swapnil Kulkarni
      Swapnil Kulkarni

      Hi Manoj,

      Thanks a lot. Really helpful and will give more space in a dashboard as well.

      One query, while implementing it I have added a Drop Down in Grid (having "slideout_inner" as CSS Class) when I am hovering on Drop Down List Item the panel is getting closed. Do I need to improvise code for this situation? When I am hovering on Drop Down box it working perfectly, facing issues only when I am trying to select from Drop Down List.

      Regards,

      Swapnil K