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/itembash
npx grassroot@latest add ui/itembash
yarn dlx grassroot add ui/itembash
bunx grassroot add ui/itemAPI Reference
| Prop | Type | Default |
|---|---|---|
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 | — |