svelte-cookie-consent
    Preparing search index...

    Type Alias Choice

    A cookie choice given to the user

    type Choice = {
        description: string;
        label: string;
        mandatory?: boolean;
        onAccepted?: () => void | Promise<void>;
        onRejected?: () => void | Promise<void>;
        value?: boolean;
    }
    Index

    Properties

    description: string

    A description of the option, shown to the user. HTML is supported.

    label: string

    The display name of the option shown to the user.

    mandatory?: boolean

    If true, this option cannot be declined by the user.

    onAccepted?: () => void | Promise<void>

    Callback function executed when the user accepts this option. Can be asynchronous.

    onRejected?: () => void | Promise<void>

    Callback function executed when the user rejects this option. Can be asynchronous.

    value?: boolean

    The default selection state of this option. If not provided, it will be considered unselected by default.