@blendsdk/react-year-planner
    Preparing search index...

    Interface YearPlannerProps

    Public props for YearPlanner.

    interface YearPlannerProps {
        activeLayerId?: string;
        annotations?: PlannerItem[];
        ariaDescribedBy?: string;
        ariaLabel?: string;
        baseRevision?: string;
        className?: string;
        components?: Partial<YearPlannerComponents>;
        contextMonths?: { after: number; before: number };
        cssVars?: Record<`--yp-${string}`, string>;
        defaultFilter?: PlannerFilter;
        defaultItems?: PlannerItem[];
        defaultSelection?: PlannerSelection;
        defaultVisibility?: VisibilityState;
        display?: DisplayConfig;
        filter?: PlannerFilter;
        getDateMeta?: (
            date: string,
            context: DateMetaContext,
        ) => DateMeta | undefined;
        groups?: LayerGroup[];
        highlightYear?: number;
        interaction?: InteractionConfig;
        items?: PlannerItem[];
        layers?: PlannerLayer[];
        messages?: Partial<PlannerMessages>;
        onChangeCommitted?: (outcome: CommandOutcome) => void;
        onChangeRejected?: (outcome: CommandOutcome) => void;
        onChangeRequest?: (
            command: PlannerCommand,
            context: CommandContext,
            signal?: AbortSignal,
        ) => CommandOutcome | Promise<CommandOutcome>;
        onContextMenuRequest?: (request: PlannerContextMenuRequest) => void;
        onDiagnostic?: (diagnostic: Diagnostic) => void;
        onFilterChange?: (next: PlannerFilter) => void;
        onItemsChange?: (items: PlannerItem[]) => void;
        onSelectionChange?: (next: PlannerSelection) => void;
        onVisibilityChange?: (next: VisibilityState) => void;
        print?: PrintConfig;
        range?: { monthCount: number; start: { month: number; year: number } };
        readOnly?: boolean;
        renderAnnotation?: (context: AnnotationRenderContext) => ReactNode;
        renderCell?: (context: CellRenderContext) => ReactNode;
        renderEmpty?: () => ReactNode;
        renderInspector?: (context: InspectorRenderContext) => ReactNode;
        renderItem?: (context: ItemRenderContext) => ReactNode;
        renderOverflow?: (context: OverflowRenderContext) => ReactNode;
        renderTooltip?: (context: TooltipRenderContext) => ReactNode;
        resources?: Resource[];
        selection?: PlannerSelection;
        showInspector?: boolean;
        style?: CSSProperties;
        units?: Partial<ClassicYearUnits>;
        unstyled?: boolean;
        validateChange?: (
            command: PlannerCommand,
            context: CommandContext,
            signal?: AbortSignal,
        ) => ValidationResult | Promise<ValidationResult>;
        visibility?: VisibilityState;
        year?: number;
    }
    Index
    activeLayerId?: string

    Layer that accepts paint/create commands.

    annotations?: PlannerItem[]

    Annotation items merged into the item namespace.

    ariaDescribedBy?: string

    ID of an external description.

    ariaLabel?: string

    Grid accessible name.

    baseRevision?: string

    Optional host-wide revision token passed through with every command.

    className?: string

    Extra root class.

    components?: Partial<YearPlannerComponents>

    Structural slot overrides.

    contextMonths?: { after: number; before: number }

    Context months before/after; defaults to 1/1.

    Type Declaration

    • after: number

      Context months after the year; defaults to 1.

    • before: number

      Context months before the year; defaults to 1.

    cssVars?: Record<`--yp-${string}`, string>

    CSS variable overrides.

    defaultFilter?: PlannerFilter

    Uncontrolled initial filter.

    defaultItems?: PlannerItem[]

    Uncontrolled initial items.

    defaultSelection?: PlannerSelection

    Uncontrolled initial selection.

    defaultVisibility?: VisibilityState

    Uncontrolled initial visibility.

    display?: DisplayConfig

    Display configuration.

    filter?: PlannerFilter

    Controlled filter.

    getDateMeta?: (date: string, context: DateMetaContext) => DateMeta | undefined

    Host date presentation.

    groups?: LayerGroup[]

    Layer groups.

    highlightYear?: number

    Year highlighted as current.

    interaction?: InteractionConfig

    Interaction configuration.

    items?: PlannerItem[]

    Controlled items.

    layers?: PlannerLayer[]

    Layers.

    messages?: Partial<PlannerMessages>

    UI message overrides. Missing messages fall back to English, so a host can translate only the strings it needs or pass a complete language catalogue from @blendsdk/year-planner-languages.

    onChangeCommitted?: (outcome: CommandOutcome) => void

    Called with an accepted outcome.

    onChangeRejected?: (outcome: CommandOutcome) => void

    Called with a rejected outcome.

    onChangeRequest?: (
        command: PlannerCommand,
        context: CommandContext,
        signal?: AbortSignal,
    ) => CommandOutcome | Promise<CommandOutcome>

    Host command request.

    onContextMenuRequest?: (request: PlannerContextMenuRequest) => void

    Raises a host-owned context-menu request for a date, item or annotation. The component never renders a menu; without a handler the native browser menu is preserved.

    onDiagnostic?: (diagnostic: Diagnostic) => void

    Receives layout, validation and command diagnostics.

    onFilterChange?: (next: PlannerFilter) => void

    Called when the filter would change.

    onItemsChange?: (items: PlannerItem[]) => void

    Called after a local item change.

    onSelectionChange?: (next: PlannerSelection) => void

    Called when selection would change.

    onVisibilityChange?: (next: VisibilityState) => void

    Called when visibility would change.

    print?: PrintConfig

    Print configuration.

    range?: { monthCount: number; start: { month: number; year: number } }

    Explicit range; wins over year.

    Type Declaration

    • monthCount: number

      Number of months in the window; 12-36.

    • start: { month: number; year: number }

      First month of the explicit window.

      • month: number

        Zero-based month index (0 = January).

      • year: number

        Calendar year of the first month.

    readOnly?: boolean

    Global read-only guardrail.

    renderAnnotation?: (context: AnnotationRenderContext) => ReactNode

    Annotation content.

    renderCell?: (context: CellRenderContext) => ReactNode

    Additive cell content.

    renderEmpty?: () => ReactNode

    Empty state content.

    renderInspector?: (context: InspectorRenderContext) => ReactNode

    Inspector content.

    renderItem?: (context: ItemRenderContext) => ReactNode

    Additive item content.

    renderOverflow?: (context: OverflowRenderContext) => ReactNode

    Overflow content.

    renderTooltip?: (context: TooltipRenderContext) => ReactNode

    Tooltip content.

    resources?: Resource[]

    Resources.

    selection?: PlannerSelection

    Controlled selection.

    showInspector?: boolean

    Inspector visibility; defaults to true.

    style?: CSSProperties

    Extra root style.

    units?: Partial<ClassicYearUnits>

    Additive layout units; wins over theme geometry.

    unstyled?: boolean

    Removes decorative defaults.

    validateChange?: (
        command: PlannerCommand,
        context: CommandContext,
        signal?: AbortSignal,
    ) => ValidationResult | Promise<ValidationResult>

    Host validation for a proposed command.

    visibility?: VisibilityState

    Controlled visibility.

    year?: number

    Display year; required unless range is supplied.