HextaUI

Item: Header and footer

<ItemHeader /> and <ItemFooter /> take a full row above and below the content.

import { Badge } from "@/components/ui/badge"
import {
  Item,
  ItemContent,
  ItemDescription,
  ItemFooter,
  ItemHeader,
  ItemTitle,
} from "@/components/ui/item"

export function ItemHeaderFooter() {
  return (
    <Item variant="outline" className="max-w-sm" render={<a href="#" />}>
      <ItemHeader>
        <span className="text-xs text-muted-foreground">hextaui/hextaui</span>
        <Badge>Open</Badge>
      </ItemHeader>
      <ItemContent>
        <ItemTitle>Rework the item component</ItemTitle>
        <ItemDescription>
          Grouped surfaces, a gliding hover highlight and selectable rows.
        </ItemDescription>
      </ItemContent>
      <ItemFooter>
        <span className="text-xs text-muted-foreground">
          #482 · 3 reviewers
        </span>
        <span className="text-xs text-muted-foreground">2h ago</span>
      </ItemFooter>
    </Item>
  )
}

This adds the example as components/examples/item/header-footer.tsx, together with the Item component and the HextaUI theme tokens it needs.

pnpm dlx shadcn@latest add https://hextaui.com/r/item-header-footer.json

To add only the component, follow the Item installation.

Props in this example

The Item props this example sets, from the API reference.

PropTypeDefault
variant
"default" | "outline" | "muted""default"
render
ReactElement | (props, state) => ReactElement<div>

Every prop is in the Item API reference.

See them all, with keyboard support and accessibility notes, on the Item page.