UIList
Preview
Section titled “Preview”UIList Props
Section titled “UIList Props”| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | UIListItem elements |
UIListItem Props
Section titled “UIListItem Props”| Prop | Type | Default | Description |
|---|---|---|---|
title | string | required | Item title |
subtitle | string | — | Secondary text |
active | boolean | false | Highlights the item |
onClick | () => void | — | Makes item clickable (renders as button) |
import { UIList, UIListItem } from "tango-api";
<UIList> {files.map((file) => ( <UIListItem key={file.path} title={file.name} subtitle={file.path} active={file.path === selected} onClick={() => setSelected(file.path)} /> ))}</UIList>