# Image Frame URL: /components/image-frame Source: https://github.com/daangn/seed-design/blob/dev/docs/content/components/image-frame.mdx A component for displaying an image uploaded by the user. ## Anatomy ![Anatomy image of Image Frame. Consists of Image Area, Corner Radius, and Border.]() Image Frame consists of an Image Area displaying the image, Corner Radius, and Border. ## Properties ### Ratio ![Image Frame Ratio Property]() The Ratio property allows the image to be displayed at a fixed ratio regardless of the image's own size. ### Size ![Image Frame Size Property - only for 1:1 ratio]() Size property is provided for the 1:1 ratio. This is not an implementation spec but closer to a recommended size guide. For other ratios, choose the Free size. ### Fallback Image ![Image Frame Has Image Contents Property]() ![Types of Image Frame Fallback Image]() When image content cannot be displayed, a Fallback image is shown. The Fallback image can use [Content Placeholder](/components/content-placeholder), and can be displayed differently depending on where it is used. ### Border Radius ![Image Frame Border Radius Property]() The Border Radius option lets you round the corners. ### Show Overlay ![Example of placing an Overlay Element in Image Frame]() Using the Show Overlay option lets you display a supplementary UI element (Overlay Element) on top of the image. ![Overlay Element placement positions and element types in Image Frame]() Overlay elements are placed in a slot at each of the four corners, and only one element can be shown per slot. The elements that can be shown in a slot are as follows, and additional elements can also be used via a Custom Slot. | Element | Purpose | | -------------------------- | ---------------------------------------------------------------------- | | [Badge](/components/badge) | Displaying a status, classification, or emphasized label | | Indicator | Conveying content meta information such as image count or video length | | Reaction Button | Inducing user interaction (e.g. an interest button) | | Icon | Displaying the content type (e.g. a play icon) | ## Guidelines ### Applying Corner Radius ![Example of applying Corner Radius - r1 up to a width of 24, r1.5 up to 48, r2 above that]() When the Rounded property is enabled, Corner Radius is set to [`$radius.r2`](/foundations/design-token/reference/%24radius.r2) (8px). If the image's width is 48 or less, it is recommended to adjust the Corner Radius value appropriately. Check the Radius tokens. ### Using the Rounded property ![Example of using the Rounded property - disabled for an image that fills the screen]() When an image is displayed filling the full screen width, disable the Rounded option. ### State ![Image Frame State - init, loading, loaded, failed]() The image has init, loading, loaded, and failed states. If the image file is large and the average loading time is 0.2 seconds or more, showing a loading state is recommended. On the other hand, if it is under 0.2 seconds, showing a loading state may cause flickering and lead to visual discomfort. The loading indicator provides the [Skeleton](/components/skeleton) method by default, and various other methods such as blur or mono color can be chosen as needed. ### Displaying an Overlay element on top of an image ![Example of using an Overlay Element - Badge + Reaction Button]() A supplementary UI element, an Overlay Element, can be shown on top of an image. Overlay elements are placed in the slots at the four corners, with only one element placeable per slot. Overlay prioritizes readability and does not obscure the main content. A maximum of 2 Overlay Elements is recommended, and the position can be adjusted depending on the elements shown. ![Example of using an Overlay Element]() **[Badge](/components/badge)** is used only to express a status or classification, not for meta information such as time, count, or length. Indicator is used only to show descriptive information that is good for the user to know before viewing the content, not for status display or emphasis purposes. **Reaction Button** is used only when there is a clear user action, and has its own separate touch area. Icon is used only for the purpose of indicating the content type, and does not have an action. ## Specification ### Image Frame Component spec (JSON): /rootage/components/image-frame.json ### Content Placeholder Component spec (JSON): /rootage/components/content-placeholder.json ### Image Frame Floater Component spec (JSON): /rootage/components/image-frame-floater.json ### Image Frame Indicator Component spec (JSON): /rootage/components/image-frame-indicator.json ### Image Frame Reaction Button Component spec (JSON): /rootage/components/image-frame-reaction-button.json