Components
Icon Button
The Icon Button is used to provide a clear and concise visual representation with a complementary action. It combines a clear icon allowing users to perform specific actions with a single click.
Interactive demo
This demo lets you preview the Icon Button and configuration options.
<CodeViewerExample> <IconButton> <Icon icon="information" /> </IconButton> </CodeViewerExample>
Usage
The Icon Button component should be used when there is a need for a simple and recognizable icon that represents a specific action or functionality.
Content
Anatomy
The anatomy of the Icon Button is simple, featuring a container measuring 24x24 pixels that houses a symbol. When pressed, the button reveals a circular background (bigger than 24x24), subtly hinting at the action it represents. This minimalist design ensures clarity and enhances user interaction, making it intuitive and visually appealing.
Formatting
Inverted
Use the default Icon Button on light surfaces and ensure it meets a11y guidelines. Use the inverted variant on darker surfaces.
Sizes
24px (Default)
The Icon Button component is designed to be used at a default size of 24 pixels (px). It is not recommended to use the Icon Button component at larger sizes, as it may negatively impact the visual harmony and consistency within the user interface.
Examples of proper usage
In the examples below, we have two images showcasing different scenarios. The first image demonstrates the action of hiding additional information, while the second image illustrates the action of opening or revealing more information.
Example showcasing how the Icon Button in Lotto hides additional information about 'Joker' for a clutter-free user interface:
Example of a Icon Button triggering the opening of a contextual dialog when clicked.
Example of how the Icon Button is used in the login feed to hide additional information about 'Bank-id'.
Example showcasing how the Icon Button can trigger the opening of a dialog when clicked.