Icon List Item
An icon list item is one entry in an icon-list, with an optional leading icon slot and the item text content.
Use it inside IconList to render a list of statements that each begin with a visual marker (check, arrow, dot, etc.).
An icon list item is one entry in an icon-list, with an optional leading icon slot and the item text content.
Use it inside IconList to render a list of statements that each begin with a visual marker (check, arrow, dot, etc.).
<div class="icon-list-item" aria-label="one item in an icon list with a leading icon slot">IconListItem</div><script lang="ts">
import IconListItem from './IconListItem.svelte';
</script>
{#snippet starIcon()}
<span>★</span>
{/snippet}
<IconListItem icon={starIcon}>Featured</IconListItem>
// In your Svelte component:
import IconListItem from "lily-design-system-svelte-headless/components/IconListItem/IconListItem.svelte";
<IconListItem>
<!-- IconListItem content -->
</IconListItem>
Item with check-mark icon:
<IconListItem>
{#snippet icon()}<CheckIcon />{/snippet}
Free shipping on every order
</IconListItem>
Plain item with no icon:
<IconListItem>
Cancel anytime
</IconListItem>
This component is part of the *List *ListItem composition pattern. It must be a child of IconList.
icon: slot/snippet/ReactNode (optional) -- leading icon contentchildren: slot -- text content of the item...restProps: any additional HTML attributeslistitem role from <li> elementaria-hidden="true" so it is excluded from the accessibility treeIconList to render a single statement with a leading icon.IconList.*ListItem from a navigation composition.Renders the structural skeleton — <li> with two inner <span> elements. Visual size, alignment, and color of the icon and text are entirely the consumer's responsibility.
Consumer CSS targets the icon-list-item class plus the inner icon-list-item-icon and icon-list-item-text classes for fine-grained control.
<li> element with class icon-list-itemicon slot is providedaria-hidden="true"icon-list-item-iconicon-list-item-text<li><li> element with class icon-list-itemicon slot/snippet/ReactNode is optional — when supplied it renders inside <span class="icon-list-item-icon" aria-hidden="true"><span class="icon-list-item-text"><li>icon-list — an ordered list of icon list item components<li>: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/liGenerated from this component's canonical metadata — the machine-checked source the implementations are held to.
listitem role from the <li> elementaria-hidden="true" (decorative)icon: slot/snippet/ReactNode (optional) -- leading icon contentchildren: slot -- text content...restProps: any additional HTML attributes