svelte-cookie-consent
    Preparing search index...

    Type Alias Choice

    A cookie choice given to the user

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

    A description of the option, shown to the user. Rendered as text by default. Use the html property for trusted or sanitized HTML.

    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.