Sanity Library Reference Docs
    Preparing search index...

    Interface PrimitiveItemProps

    Props for the base item component.

    interface PrimitiveItemProps {
        children: ReactNode;
        description: string;
        focused?: boolean;
        index: number;
        inputId: string;
        key: string;
        level: number;
        onBlur: (event: FocusEvent) => void;
        onFocus: (event: FocusEvent) => void;
        onRemove: () => void;
        parentSchemaType: ArraySchemaType;
        path: Path;
        readOnly?: boolean;
        renderDefault: (props: ItemProps) => Element;
        schemaType: any;
        title: string;
        validation: FormNodeValidation[];
        value: string | number | boolean;
    }

    Hierarchy (View Summary)

    Index

    Properties

    children: ReactNode

    The children of the item.

    description: string

    The description of the item.

    focused?: boolean

    Whether the item is focused.

    index: number

    The index of the item.

    inputId: string

    The ID of the input element.

    key: string

    The key of the item.

    level: number

    The level of the item.

    onBlur: (event: FocusEvent) => void

    The function to call when the item loses focus.

    onFocus: (event: FocusEvent) => void

    The function to call when the item receives focus.

    onRemove: () => void

    The function to call when the item is removed.

    parentSchemaType: ArraySchemaType

    The schema type of the parent array containing the item.

    path: Path

    The path of the item.

    readOnly?: boolean

    Whether the item is read-only.

    renderDefault: (props: ItemProps) => Element

    The function to call to render the default item. See ItemProps

    schemaType: any

    The schema type of the primitive item.

    title: string

    The title of the item.

    validation: FormNodeValidation[]

    The validation markers for the item.

    value: string | number | boolean

    The value of the primitive item.