CLI previewInstall commands shown on this site are not released yet.

DocsComponentsPrimitives

Item

React example follows below.
ts
import { Item } from "@grassroot/ui-react";
<Item
leading={<span>LA</span>}
title="ledger-api"
description="Platform · prod"
trailing={<span>Healthy</span>}
/>
<Item bare active title="edge-gateway" description="Edge · prod" onClick={() => {}} />

No translated snippet for this adapter yet.

No translated snippet for this adapter yet.

No translated snippet for this adapter yet.

ts
import { Item } from "@grassroot/ui-solid";
export function Example() {
return (
<>
<Item
leading={<span>LA</span>}
title="ledger-api"
description="Platform · prod"
trailing={<span>Healthy</span>}
/>
<Item bare active title="edge-gateway" description="Edge · prod" onClick={() => {}} />
</>
);
}

Installation

bash
pnpm dlx grassroot add ui/item
bash
npx grassroot@latest add ui/item
bash
yarn dlx grassroot add ui/item
bash
bunx grassroot add ui/item

API Reference

ItemProps
PropTypeDefault
leadingLeading visual — icon node or avatar.React.ReactNode
titlerequiredPrimary text.React.ReactNode
descriptionSecondary text beneath the title.React.ReactNode
trailingTrailing slot — badge, mono meta, chevron, etc.React.ReactNode
hrefRender as an anchor instead of a div/button.string | undefined
bareDrop the card border + background — for rows inside a list/scroll container.boolean | undefined
activeMarks the row as active (sunken tint, crimson inset rule).boolean | undefined