A basic collection of smooth animations to use within your page.
To apply this component, add any .uk-animation-*
class to an element and it will fade in with a nice animation. These classes are commonly set by using JavaScript to apply the animation to specific behaviors.
Class |
Description |
.uk-animation-fade |
The element fades in. |
.uk-animation-scale-up |
The element scales up. |
.uk-animation-scale-down |
The element scales down. |
.uk-animation-slide-top |
The element slides in from the top. |
.uk-animation-slide-bottom |
The element slides in from the bottom. |
.uk-animation-slide-left |
The element slides in from the left. |
.uk-animation-slide-right |
The element slides in from the right. |
.uk-animation-shake |
The element shakes. |
.uk-animation-scale |
The element scales down without fading in. |
Example
Click on any of the boxes to see the animation.
Markup
<div class="uk-animation-fade">...</div>
By default, all aimations are incoming. To reverse any animation, add the .uk-animation-reverse
class.
Example
Click on any of the boxes to see the animation.
Markup
<div class="uk-animation-fade uk-animation-reverse">...</div>
To stretch the animation duration to 15 seconds, add the .uk-animation-15
class.
Example
Markup
<div class="uk-animation-slide-right uk-animation-15">...</div>
By default, scaling animations originate from the center. To modify this behavior, add one of these classes.
Class |
Description |
.uk-animation-top-left |
The animation spreads from the top left. |
.uk-animation-top-center |
The animation spreads from the top center. |
.uk-animation-top-right |
The animation spreads from the top right. |
.uk-animation-middle-left |
The animation spreads from the middle left. |
.uk-animation-middle-right |
The animation spreads from the middle right. |
.uk-animation-bottom-left |
The animation spreads from the bottom left. |
.uk-animation-bottom-center |
The animation spreads from the bottom center. |
.uk-animation-bottom-right |
The animation spreads from the bottom right. |
Example
Click on any of the boxes to see the animation.
To trigger an animation on hover, just add the .uk-animation-hover
class to the animated element itself or to a container.
Example
Markup
<div class="uk-animation-hover uk-animation-fade">...</div>
<div class="uk-animation-hover">
<div class="uk-animation-slide-right">...</div>
</div>
Create layout boxes with different styles.
UIkit uses panels to outline certain sections of your content, which can be styled differently. Typically, panels are arranged in grid columns from the Grid component.
The Panel component consists of the panel itself, the panel title and a panel badge. To prevent redundant white space, top and bottom margins are removed from the panel's content.
Class |
Description |
.uk-panel |
Add this class to a <div> element to define the Panel component. |
.uk-panel-title |
Add this class to a heading to create the panel title. |
.uk-panel-badge |
Add this class to a <div> element to create a panel badge. The easiest way to style your badge, is by adding the modifier classes from the Badge component. |
Example
Hot
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
NOTE By default, a panel is blank and has no styling. That is why it is important to add a modifier class, which gives the panel some styling. In our examples we used the .uk-panel-box
class.
Markup
<div class="uk-panel">
<div class="uk-panel-badge uk-badge">...</div>
<h3 class="uk-panel-title">...</h3>
...
</div>
Panels in a grid
This is a short example of how to use panels with the Grid component. Both panels are using the .uk-width-medium-1-2
class.
Example
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.
Markup
<div class="uk-grid">
<div class="uk-width-medium-1-2">
<div class="uk-panel">...</div>
</div>
<div class="uk-width-medium-1-2">
<div class="uk-panel">...</div>
</div>
</div>
Modifier classes are necessary to add a specific style to panels. UIkit includes a number of panel modifiers and you also have the possibility to create your own.
Panel box
Add the .uk-panel-box
class to create a visually styled box. This is the default panel modifier.
Example
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box
Markup
<div class="uk-panel uk-panel-box">...</div>
NOTE To create a hover effect on the panel, just add the .uk-panel-box-hover
class. This comes in handy when working with anchors.
Panel box primary
Add the .uk-panel-box-primary
class to modify the box panel and emphasize it with a different color.
Example
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-primary
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-primary
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-primary
Markup
<div class="uk-panel uk-panel-box uk-panel-box-primary">...</div>
NOTE To create a hover effect on the panel, just add the .uk-panel-box-primary-hover
class. This comes in handy when working with anchors.
Panel box secondary
Add the .uk-panel-box-secondary
class to modify the box panel and give it a white background.
Example
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-secondary
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-secondary
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-secondary
Markup
<div class="uk-panel uk-panel-box uk-panel-box-secondary">...</div>
NOTE To create a hover effect on the panel, just add the .uk-panel-box-secondary-hover
class. This comes in handy when working with anchors.
Panel hover
Add the .uk-panel-hover
class to add a hover effect to the panel. This comes in handy when using the panel as an anchor.
Example
Markup
<a class="uk-panel uk-panel-hover" href="">...</a>
Panel header
Add the .uk-panel-header
class to separate the panel title and content with a horizontal line.
Example
Markup
<div class="uk-panel uk-panel-header">...</div>
Panel space
Add the .uk-panel-space
class to increase the spacing around the panel content.
Example
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-space
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-space
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-space
Markup
<div class="uk-panel uk-panel-space">...</div>
Panel divider
Add the .uk-panel-divider
class to separate vertically stacked panels with lines.
Example
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-divider
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-divider
Title
Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-divider
Markup
<div class="uk-grid">
<div class="uk-width-medium-1-2">
<div class="uk-panel uk-panel-divider">...</div>
<div class="uk-panel uk-panel-divider">...</div>
<div class="uk-panel uk-panel-divider">...</div>
</div>
</div>
NOTE Use the .uk-grid-divider
class from the Grid component to separate grid columns.
To display an image inside a panel box that is attached to the border of the panel without any spacing, just add the .uk-panel-teaser
class to a <div>
element inside the panel.
Example
Lorem ipsum dolor sit amet, consectetur adipisicing elit.
Markup
<div class="uk-panel uk-panel-box">
<div class="uk-panel-teaser">
<img src="" alt="">
</div>
</div>
Easily apply an icon from our Icon component to your panel by adding one of the .uk-icon-*
classes to an <i>
or <span>
element inside the panel title.
Example
Panel
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Panel
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Panel
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Markup
<div class="uk-panel">
<h3 class="uk-panel-title"><i class="uk-icon-*"></i>...</h3>
</div>