# List URL: /components/list Source: https://github.com/daangn/seed-design/blob/dev/docs/content/components/list.mdx A component that represents content arranged in horizontal rows. ## Anatomy ![Anatomy image of List. List Item consists of Suffix, Prefix, Title, and Detail.]() List Item consists of Suffix, Prefix, Title, and Detail. **The background color is added in the guide for visual distinction only; the component itself does not have a background color specified.** ## Properties ### Align Property ![Single Line and Multi Line Variants of List Item]() The default value of Align is Center. Prefix and Suffix are aligned to the vertical center of the content area. Suitable when Title and Detail are displayed short, on a single line. ![Example of aligning List Item to the top]() Setting Align to Top fixes Prefix and Suffix to the top of the content area. Used when the Title becomes long and wraps to two or more lines, or when there is a lot of Detail text. ### Highlighted Property ![Highlighted Property of List]() The List component's Highlighted prop is used to visually emphasize an item that needs the user's attention, such as a new notification or update. ### List State ![List State - Enabled, Pressed, Disabled]() The List component provides Enabled, Pressed, and Disabled states. ### Prefix Property ![Prefix Property of List]() The Prefix Slot is positioned on the left side of the List. The List Item component provides several types in the Prefix as presets. If you want to use an element other than the included types, change it via Custom Child Swap. ### Suffix Property ![Suffix Property of List]() Suffix is positioned on the right side of the List. The List Item component provides several types in the Suffix as presets. If you want to use an element other than the included types, change it via Custom Child Swap. ### Detail Property ![Detail Property of List]() Detail is positioned below the List title. Sub Text and Tag Group are provided by default, and can be customized as needed at the point of use. ## Guidelines ### Using List and List Item ![Example of using List and List Item]() ![Example where one of the List Items in a List is in the Pressed state]() List Item is a component that groups and expresses information in a horizontal row, and should be used when the user needs to quickly recognize it and perform a simple action. List is used when multiple List Items need to be grouped and expressed as a continuous column. The parent container of List can be freely used according to the intent of the point of use. ### Using grouped with List Header ![Example of grouping with List Header]() The List Header component is provided so that a List can be expressed grouped by unit. ### Do not use List Item as clickable ![Example of not using List Item as clickable]() List Item includes clickable behavior by default. At the point of use, the clickable behavior can be directly removed depending on intent, flow, and context. ### Adjusting internal spacing of List Item ![Example of adjusting List Item's top/bottom padding spacing]() ![Example of adjusting List Item's left/right padding spacing]() ![Example of adjusting List Item's internal spacing]() List Item has height, width, and padding spacing, which can be freely adjusted according to the intent of the point of use. - Use the tokens provided by Crispy for spacing. - When adjusting width spacing, be careful not to go narrower than `{global-gutter=16px}`. - When adjusting internal spacing, be careful that the alignment of each Item within the List does not become inconsistent. ### List Item clickable ![Case with a single List Item click target area]() List Item provides click behavior by default and can be used in combination with multiple interactive elements. If you use an element other than the Button component provided by List, custom to your needs, define the behavior specification in a separate spec. ![Case with two List Item click target areas]() ![Case with three or more List Item click target areas]() ![Case with a Floating element such as Help Bubble]() **Since List Item has limited display space, do not combine interactive elements in a complex way.** ### When using Switch/Checkmark/Radiomark When placing [Switchmark](/components/switch#switchmark), [Checkmark](/components/checkbox#checkmark), or [Radiomark](/components/radio#radio-mark) in the prefix or suffix of a List Item, use the entire List Item as a single click area so that the action occurs no matter where in the row is pressed. In this case, do not place an element that needs its own click area, such as [Action Button](/components/action-button), together in the prefix/suffix. ![Example of placing a Switchmark in the suffix of a List Item and using the entire row as the click area]() If there is information that needs to be checked on a separate screen, such as terms of service, use a hyperlink within the label text, but ensure the tap does not propagate to the row action. ![Example in a terms-agreement Bottom Sheet where each term item's 'View' hyperlink lets the user check the terms on a separate screen, separated from the checkbox row action]() ### Concentric Radius ![Example of Concentric Radius]() The pressed-inset radius of an item can be flexibly adjusted to match the corner radius of the container that contains the List Item. When a list is included inside a card container with an R value, applying the same radius as the container as-is may visually appear mismatched. To handle this, the internal element's Radius is applied by subtracting the internal padding value from the parent container's radius. For example, if the card container's Radius is 16px and the card's Padding is 6px, the inner list's Radius = 16px - 6px = 10px. ### Customizing List Item as Select ![Case of combining with Bottom Sheet - Checkmark]() ![Case of combining with Bottom Sheet - Radio Mark]() ![Case of using Radio Mark inside a List]() If you combine [Checkbox](/components/checkbox) or Radio Mark with a List Item, it can be used as a Select. Checkbox means Multi Select, and Radio Mark means Single Select. When using Single Select, the List Item must include at least 2 items for the Select to be correctly composed. ## Specification ### List Item Component spec (JSON): /rootage/components/list-item.json ### List Header Component spec (JSON): /rootage/components/list-header.json