Close

Create a close icon that can be combined with different components.

FrankenstyleKit (aka Franken UI 3.0) is now available. Support for the current version will gradually wind down. It will continue to work, but using the latest version is recommended for new projects so you can benefit from future updates and enhancements.

Table of contents

Usage

To apply this component, add the data-uk-close attribute to an <a> or <button> element.

Close in alerts

This is an example of how this component is used with an alert box from the Alert component.

  • Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

Close in drops

This is an example of how this component is used with the Drop component.

  • Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt.

Close in modals

This is an example of how this component is used with the Modal component.

  • Open modal

Accessibility

The Close component automatically sets the appropriate WAI-ARIA roles and properties.

  • The close icon has the aria-label property, and if an <a> element is used, the button role.

Internationalization

The Close component uses the following translation strings. Learn more about translating components.

KeyDefaultDescription
labelClosearia-label attribute.
Customize

Customize your Franken UI experience.