---
title: Prefix in Figma
slug: wip/prefix-in-figma
createdAt: 2023-12-20T08:54:23.624Z
---

# Prefix in Figma

## What is a prefix?

A prefix is a placeholder in design that serves as a temporary marker until the desired item (e.g. icons, flags, avatars, ...) is assigned. The use of prefixes helps with efficient organization and visual identification of elements within the component.

![](https://api.archbee.com/api/optimize/Kp4perMrWxGYfa_PWfi7H/IARd7grILjYG8e0-0Kxiz_prefix.png)

## How is a prefix changed in Figma?

1\. Create an element, with a maximum container size (e.g. 24x24px).

2\. Wrap it in an auto-layout container with 0px padding and center-align.

3\. Set containers' resizing constraints to “Hug”, and prefix to “Fixed”.

4\. Create a component out of the element.

5\. Set the "✦ prefix-slot" property of the component to 'on.'

6\. Swap the prefix with your new component using the "↳ prefix-content" instance swap property.



:::Iframe{iframeHeight="0" code="<iframe height=&#x22;600px&#x22; style=&#x22;width: 100%;&#x22; scrolling=&#x22;no&#x22; title=&#x22;Docs Video – Cosmos Prefix&#x22; src=&#x22;https://codepen.io/redbulldesign/embed/VwRezKv/9af51951d73c83e8c724fc8d09ffcb8a?default-tab=result&theme-id=39623&#x22; frameborder=&#x22;no&#x22; loading=&#x22;lazy&#x22; allowtransparency=&#x22;true&#x22; allowfullscreen=&#x22;true&#x22;>&#xA;  See the Pen <a href=&#x22;https://codepen.io/redbulldesign/pen/VwRezKv/9af51951d73c83e8c724fc8d09ffcb8a&#x22;>&#xA;  Docs Video – Cosmos Prefix</a> by Red Bull Media House GmbH (<a href=&#x22;https://codepen.io/redbulldesign&#x22;>@redbulldesign</a>)&#xA;  on <a href=&#x22;https://codepen.io&#x22;>CodePen</a>.&#xA;</iframe>"}

:::

## What sizes do we use?

The following Cosmos web components contain prefix slots in the design in the sizes listed below:

| **Component**                                                                                                                                                                                                                                                                                                                                                                                    | **Prefix Size**                                   |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------- |
| Asset Items:<br />[Default Item](https://cosmos.redbull.design/wip/default-item), [Link Item](https://cosmos.redbull.design/wip/link-item), [Person Item](https://cosmos.redbull.design/wip/person-item), [Product Item](https://cosmos.redbull.design/wip/product-item), [Story Item](https://cosmos.redbull.design/wip/story-item), [Video Item](https://cosmos.redbull.design/wip/video-item) | 16x16 px                                          |
| Form Fields:<br />[Checkbox](https://cosmos.redbull.design/wip/checkbox), [Checkbox Group](https://cosmos.redbull.design/wip/checkbox-group), [Radio Group](https://cosmos.redbull.design/wip/radio-group), [Select](https://cosmos.redbull.design/wip/select)                                                                                                                                   | 24x24 px                                          |
| Indicators:<br />[Badge](https://cosmos.redbull.design/wip/badge)                                                                                                                                                                                                                                                                                                                                | 16x16 px (Small and Medium)<br />18x18 px (Large) |
| Indicators:<br />[Chip](https://cosmos.redbull.design/wip/chip)                                                                                                                                                                                                                                                                                                                                  | 16x16 px                                          |

