Data display
MiniInfoCell
Compact info line with a small icon, for profile details, "Add info" and "Show more" rows.
import { MiniInfoCell } from "datui";Playground
<MiniInfoCell mode="base" textWrap="nowrap">Lives in Lisbon</MiniInfoCell>Examples
Modes
Text wrapping
nowrap truncates, short clamps to 3 lines, full wraps.
Accessibility
- Renders a
<button>withonClick, otherwise a static<div>. - Icons are decorative; pass lucide icons (which are
aria-hidden) or mark custom onesaria-hidden.
API
MiniInfoCell
Compact info line with a small icon, e.g. profile details. Renders a button with `onClick`.
| Prop | Type | Default | Description |
|---|---|---|---|
| activated | boolean | — | Keep the pressed look, e.g. for the active item of a list. |
| after | ReactNode | — | |
| as | ElementType<any, keyof IntrinsicElements> | — | Element to render. Defaults to `a` with `href`, `button` with `onClick`, otherwise `div`. |
| before | ReactNode | — | Small leading icon. |
| chevron | boolean | false | |
| className | string | — | |
| disabled | boolean | — | |
| href | string | — | |
| mode | "base" | "accent" | "add" | "more" | base | `base` plain info, `accent` link-colored, `add` call to add info, `more` "show more" row. |
| rel | string | — | |
| target | string | — | |
| textWrap | "full" | "nowrap" | "short" | nowrap | `nowrap` truncates to one line, `short` clamps to 3 lines, `full` wraps freely. |
| type | "button" | "submit" | "reset" | — |