Create layout boxes with different styles.

\n\n

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.

\n\n
\n\n

Usage

\n\n

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.

\n\n
\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
ClassDescription
.uk-panelAdd this class to a <div> element to define the Panel component.
.uk-panel-titleAdd this class to a heading to create the panel title.
.uk-panel-badgeAdd 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.
\n
\n\n

Example

\n\n
\n
Hot
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n
\n\n\n

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.

\n\n

Markup

\n\n
<div class="uk-panel">\n    <div class="uk-panel-badge uk-badge">...</div>\n    <h3 class="uk-panel-title">...</h3>\n    ...\n</div>
\n\n
\n\n

Panels in a grid

\n\n

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.

\n\n

Example

\n\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor.\n
\n
\n
\n\n

Markup

\n\n
<div class="uk-grid">\n    <div class="uk-width-medium-1-2">\n        <div class="uk-panel">...</div>\n    </div>\n    <div class="uk-width-medium-1-2">\n        <div class="uk-panel">...</div>\n    </div>\n</div>
\n\n
\n\n

Modifiers

\n\n

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.

\n\n

Panel box

\n\n

Add the .uk-panel-box class to create a visually styled box. This is the default panel modifier.

\n\n

Example

\n\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box\n
\n
\n
\n\n

Markup

\n\n
<div class="uk-panel uk-panel-box">...</div>
\n\n

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.

\n\n
\n\n

Panel box primary

\n\n

Add the .uk-panel-box-primary class to modify the box panel and emphasize it with a different color.

\n\n

Example

\n\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-primary\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-primary\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-primary\n
\n
\n
\n\n

Markup

\n\n
<div class="uk-panel uk-panel-box uk-panel-box-primary">...</div>
\n\n

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.

\n\n
\n\n

Panel box secondary

\n\n

Add the .uk-panel-box-secondary class to modify the box panel and give it a white background.

\n\n

Example

\n\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-secondary\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-secondary\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-box-secondary\n
\n
\n
\n\n

Markup

\n\n
<div class="uk-panel uk-panel-box uk-panel-box-secondary">...</div>
\n\n

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.

\n\n
\n\n

Panel hover

\n\n

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.

\n\n

Example

\n\n \n\n

Markup

\n\n
<a class="uk-panel uk-panel-hover" href="">...</a>
\n\n
\n\n

Panel header

\n\n

Add the .uk-panel-header class to separate the panel title and content with a horizontal line.

\n\n

Example

\n\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-header\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-header\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-header\n
\n
\n
\n\n

Markup

\n\n
<div class="uk-panel uk-panel-header">...</div>
\n\n
\n\n

Panel space

\n\n

Add the .uk-panel-space class to increase the spacing around the panel content.\n\n

Example

\n\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-space\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-space\n
\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-space\n
\n
\n
\n\n

Markup

\n\n
<div class="uk-panel uk-panel-space">...</div>
\n\n
\n\n

Panel divider

\n\n

Add the .uk-panel-divider class to separate vertically stacked panels with lines.

\n\n

Example

\n\n
\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-divider\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-divider\n
\n
\n

Title

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit. .uk-panel-divider\n
\n
\n
\n\n

Markup

\n\n
<div class="uk-grid">\n    <div class="uk-width-medium-1-2">\n        <div class="uk-panel uk-panel-divider">...</div>\n        <div class="uk-panel uk-panel-divider">...</div>\n        <div class="uk-panel uk-panel-divider">...</div>\n    </div>\n</div>
\n\n

NOTE Use the .uk-grid-divider class from the Grid component to separate grid columns.

\n\n
\n\n

Panel box with teaser

\n\n

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.

\n\n

Example

\n\n
\n
\n
\n \n
\n

Lorem ipsum dolor sit amet, consectetur adipisicing elit.

\n
\n
\n\n

Markup

\n\n
<div class="uk-panel uk-panel-box">\n    <div class="uk-panel-teaser">\n        <img src="" alt="">\n    </div>\n</div>
\n\n
\n\n

Panel with icons

\n\n

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.

\n\n

Example

\n\n
\n
\n
\n

Panel

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n
\n
\n
\n
\n

Panel

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n
\n
\n
\n
\n

Panel

\n Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.\n
\n
\n
\n\n

Markup

\n\n
<div class="uk-panel">\n    <h3 class="uk-panel-title"><i class="uk-icon-*"></i>...</h3>\n</div>
\n