SheetXL - v1.0.7
    Preparing search index...

    Interface ItemCardProps<T>

    interface ItemCardProps<T = any> {
        actions?: ReactNode;
        Body?: ComponentType<ItemBodyProps<T>>;
        canMoveDown?: boolean;
        canMoveUp?: boolean;
        caption?: ReactNode;
        item: T;
        Media?: ComponentType<ItemBodyProps<T>>;
        messageKeys: Partial<
            Pick<
                ItemMessageKeys,
                "moveUp"
                | "moveDown"
                | "edit"
                | "duplicate"
                | "delete",
            >,
        >;
        onDelete?: () => void;
        onDuplicate?: () => void;
        onEdit?: () => void;
        onMoveBy?: (delta: number) => void;
        onSelect?: () => void;
        readOnly?: boolean;
        selected?: boolean;
        subscribeItem?: (item: T, onChange: () => void) => () => void;
        subtitle?: string | null;
        Subtitle?: ComponentType<ItemBodyProps<T>>;
        sx?: SxProps<Theme>;
        title: string;
    }

    Type Parameters

    • T = any

    Hierarchy

    • HTMLAttributes<HTMLDivElement>
      • ItemCardProps
    Index
    actions?: ReactNode

    The feature's own actions, shown in the hover row ahead of the built-in ones. Use ItemCardAction so they look and behave as the built-in ones do.

    Body?: ComponentType<ItemBodyProps<T>>

    Feature content below the subtitle.

    canMoveDown?: boolean
    canMoveUp?: boolean
    caption?: ReactNode

    A quiet second line under the title, beside the Media. For a detail that belongs to the title (where an item is) rather than a section of the card under a divider, as subtitle is. With a caption the media and the actions align to the title's line rather than centering on the two lines.

    item: T
    Media?: ComponentType<ItemBodyProps<T>>

    Leading visual at the card's top-left, before the title.

    messageKeys: Partial<
        Pick<
            ItemMessageKeys,
            "moveUp"
            | "moveDown"
            | "edit"
            | "duplicate"
            | "delete",
        >,
    >

    The feature's catalog keys for the built-in action tooltips. A built-in action whose key is missing is not offered.

    onDelete?: () => void

    Omit to hide the delete affordance.

    onDuplicate?: () => void

    Omit to hide the duplicate affordance.

    onEdit?: () => void

    Omit for an item with no editor — the title is then plain text and no edit action is offered. See ItemsDescriptor.createDraft.

    onMoveBy?: (delta: number) => void

    Omit to hide the move affordances (unordered list).

    onSelect?: () => void

    A click on the card's surface — anywhere that is not the title, an action, or a control the card carries. Omit when there is nothing on the grid to select.

    readOnly?: boolean

    Hides every action affordance.

    selected?: boolean

    Marks the card as the one the host is pointing at (the item revealed on the grid). Drawn as the focus outline, without taking focus.

    subscribeItem?: (item: T, onChange: () => void) => () => void

    Subscribes to the item's own events to re-render this card.

    subtitle?: string | null

    The emphasized line below the header. null renders nothing.

    Subtitle?: ComponentType<ItemBodyProps<T>>

    Renders the subtitle line instead of subtitle, for a feature whose subtitle is a control rather than a string — a range the card lets you edit in place.

    sx?: SxProps<Theme>

    Merged over the card's own styling — a host's accent ('&.Mui-selected''s outline) or density (gap).

    title: string

    The one-line header.