Generic selectors

Exact matches only

Search in title

Search in content

Post Type Selectors

Close

Dismiss components with a clear Close icon. Accessible, and enhancing usability across interfaces.

  • Overview
  • Specs
  • Guidelines

Component

The Close Button is a fundamental UI element used to dismiss or close a specific component, modal, or notification within an interface.

It typically consists of a small icon or symbol, such as an X, positioned in the corner of the component. The Close Button provides users with a clear and intuitive way to exit or dismiss content or interactions, enhancing usability and user experience.

Close_Anatomy
Close Button anatomy

A: Close Component

1: Hover Background

2: Icon

Flyout - close_button
Close button inside a flyout

Used for:

Modals

When presenting a modal, the user must be able to dismiss it. This can be reached either by clicking outside the modal area or by using the Close Button;

Tabs

When using the Removable variation of tabs, the Close Button is displayed to remove/dismiss the tab item;

Text-fields

In this context, the Close Button is used for clearing the introduced data in the Focus state;

Flyouts

As is the case with modals, Close Buttons are used to dismiss the flyout as a complementary access, by using the keyboard, for example;

Drafts

In order to remove drafts, the Close Button can be used as it isn’t a critical action inside the user flow.

Don’t use for:

Replacing delete buttons

A Close Button is only for dismissing or closing its parent component, not for taking a destructive action. In this situation, consider using a button;

Non-dismissible components

In views or areas where the focus is important, consider not using the Close Button;

Guided processes

In interfaces guiding users through a step-by-step process or tutorial, Close Buttons may undermine the guided experience by allowing users to skip ahead or exit prematurely;

Error prevention

In interfaces where closing a component could result in data loss or unintended actions, such as in form submissions or document editing applications, omitting Close Buttons can help prevent user errors.

Close_button_TextField
Close Button misapplied inside text field


Demo

Access the Figma file and inspect the element using Dev Mode.

close_Figma
Close at Figma

Last Update

CloseButton
Current version of the Close
  • Added to Design System;

Related

Modal

Under Maintenance …

Flyout

Flyout is used to show additional information about the page content, make additional settings, see notifications …

Notification Panel

This pattern allows users to access and read all notifications in one place, without them piling up on the desktop …

States

CloseButton
Close Button
Enabled
.enabled {
  color: var(--grey-7);
}
Hover
.hover {
  background-color: var(--grey-3);
  color: var(--grey-8);
}
Pressed
.pressed {
  background-color: var(--grey-4);
  color: var(--grey-8);
}

Size

Small
.small {
  border-radius: var(--rounded);
  icon: 16px;
}
Regular
.regular {
  border-radius: var(--rounded);
  icon: 20px;
}
Large
.large {
  border-radius: var(--rounded);
  icon: 24px;
}

Useful links

guidelines figma accent icon

Consult our Figma file to access our assets and inspect them in dev mode.

polygon-framework

This component is or will be provided by the Polygon framework. See its documentation to learn more.

This element is in line with the guidelines of the CDS (Cegid Design System). Find out more.

Behavior

Close status

The Close Button changes between hover and pressed in order to have visual feedback and affordance towards the user.

Hover_CloseButton
Hover variation of Close Button


Dos & Dont’s

The applied size should be consistent to the component size;

Don’t apply different colors to the Close other than the ones specified;

Avoid using Close Buttons to trigger destructive actions;


Case Studies

Building a new Seamless User Experience

Using a design system is like having a set of building blocks for creating digital products. It ensures everything looks …

Discover the exciting features

Compose Design brings a host of thrilling and transformative new features designed to enhance your experience. Dive into our latest …

Benefits of a Design System

A design system is a collection of reusable components and guidelines that ensure consistency and efficiency in building digital products …

Outline