This component can be applied to an image, an anchor or text. Just add the .uk-overlay to a container element and the .uk-overlay-area class to a <div> to create the overlay itself.
Example
Markup
<!-- This is a div with an overlay --><divclass="uk-overlay"><imgsrc=""alt=""><divclass="uk-overlay-area"></div></div><!-- This is an anchor with an overlay --><aclass="uk-overlay"href=""><imgsrc=""alt=""><divclass="uk-overlay-area"></div></a>
By default, the overlay displays an icon. But you can also enter your own content, like text or a button. Just add the .uk-overlay-area-content class to a <div> element inside the overlay area.
Example
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
<!-- This is a div with an overlay caption --><divclass="uk-overlay"><imgsrc=""alt=""><divclass="uk-overlay-caption">...</div></div><!-- This is an anchor with an overlay caption --><aclass="uk-overlay"href=""><imgsrc=""alt=""><divclass="uk-overlay-caption">...</div></a>
You can also apply an overlay to a thumbnail from the Thumbnail component. To toggle the overlay by hovering the thumbnail's caption or frame, just add the .uk-overlay-toggle class.
To apply this component, just add the .uk-thumbnail class to an <img>, <a> or <figure> element.
Example
Markup
<!-- This is an image as a thumbnail --><imgclass="uk-thumbnail"src=""alt=""><!-- This is an anchor as a thumbnail --><aclass="uk-thumbnail"href=""><imgsrc=""alt=""></a><!-- This is a figure as a thumbnail --><figureclass="uk-thumbnail"><imgsrc=""alt=""></figure>
Caption
Add the .uk-thumbnail-caption class to a <div> element to apply a text caption under the image.
<!-- This is a div as a thumbnail with a caption --><divclass="uk-thumbnail"><imgsrc=""alt=""><divclass="uk-thumbnail-caption">...</div></div><!-- This is an anchor as a thumbnail with a caption --><aclass="uk-thumbnail"href=""><imgsrc=""alt=""><divclass="uk-thumbnail-caption">...</div></a><!-- This is a figure as a thumbnail with a caption --><figureclass="uk-thumbnail"><imgsrc=""alt=""><figcaptionclass="uk-thumbnail-caption">...</figcaption></figure>
Apply the .uk-thumbnail-large, .uk-thumbnail-medium, .uk-thumbnail-small or .uk-thumbnail-mini classes to resize images. The Base component is required to make the images responsive by default.
You can even scale a thumbnail beyond its proper size, so that it extends to the full width of its parent element. Just add the .uk-thumbnail-expand class.
To apply this component, add the .uk-button class to an <a> or <button> element. Now you have created a button. Add the disabled attribute to a <button> element to disable the button.
NOTE If you are displaying a number of buttons in a row, you can add a top margin to them, when they stack on smaller viewports. Just add the data-uk-margin attribute from the Utility component to their parent element.
Toggle between a group of buttons like a checkbox by wrapping a <div> element with the data attribute data-uk-button-checkbox around them. This can also be applied to a button group.
Toggle between a group of buttons, like radio buttons, by wrapping a div element that uses data-uk-button-radio around them. This can also be applied to a button group.
A button can be used to trigger a dropdown menu from the Dropdown component. Just add the .uk-button-dropdown class and the data-uk-dropdown attribute to a <div> element that contains the button and the dropdown itself.
<!-- This is the container enabling the JavaScript --><divclass="uk-button-dropdown"data-uk-dropdown><!-- This is the button toggling the dropdown --><buttonclass="uk-button">...</button><!-- This is the dropdown --><divclass="uk-dropdown uk-dropdown-small"><ulclass="uk-nav uk-nav-dropdown"><li><ahref="">...</a></li><li><ahref="">...</a></li></ul></div></div>
Button group with dropdowns
Use button groups to split buttons into a standard action on the left and a dropdown toggle on the right. Just wrap a <div> element around the button and the dropdown and add the data-uk-dropdown="{mode:'click'}" attribute. Of course, a dropdown can also be applied to a button within a button group.
<divclass="uk-button-group"><!-- This is a button --><buttonclass="uk-button">...</button><!-- This is the container enabling the JavaScript --><divdata-uk-dropdown="{mode:'click'}"><!-- This is the button toggling the dropdown --><ahref=""class="uk-button">...</a><!-- This is the dropdown --><divclass="uk-dropdown uk-dropdown-small"><ulclass="uk-nav uk-nav-dropdown"><li><ahref="">...</a></li><li><ahref="">...</a></li></ul></div></div></div>