Setting the file. One moment.
Subchapter 1.61
references/context-provider/vertical-contexts/events/event-item-2.mdMarkdown9 KBView on GitHub
@wix/events/context/event-item (part 2 of 3)This context’s reference is split across 3 files: event-item.md, , .
Read Importing a Context in Code first. Import only the hook, from @wix/events/context/event-item.
| Property | Type | Description |
|---|---|---|
editor | boolean | Whether the component runs in the editor. In the editor, values the event leaves empty, such as title and shortTeaser, hold sample content, and the context uses a sample event when the container has none. The flags, such as hasShortTeaser, describe the real event whenever the container found an event. |
i18nInstance | i18n | i18next (opens in a new tab) instance with the Events app’s translations, in the site’s language. Falls back to English when the app has no translations for the site’s language. |
event | Event$1 | undefined | The event, as an event object from the Events V3 API (opens in a new tab). It differs from the stored event in these ways: - mainImage is a placeholder image when the event has none. - In the editor, an empty title, shortDescription, or description holds a sample value, and a missing location or dateAndTimeSettings holds sample settings. undefined when the container found no event. In the editor, a sample event instead. |
ticketDefinitions | TicketDefinition$1[] | Ticket definitions of the event, from the Ticket Definitions V3 API (opens in a new tab). Holds up to 100 ticket definitions. Empty when the event isn’t ticketed. Always empty in an Event Item. In the editor, sample ticket definitions whenever the list would be empty, including for an event that isn’t ticketed. To fetch them again, such as after a purchase changes availability, call refetchTicketDefinitions(). |
plans | PlanInfo[] | Membership plans that apply to the event: plans the site member bought, and active plans that are visible to visitors. Sorted by discount.percentOffRate, highest first. Empty when the event isn’t ticketed, the site doesn’t have Wix Pricing Plans, or loading the plans fails. Always empty in an Event Item. In the editor, sample plans whenever the list would be empty. The context fetches the plans again when a site member logs in, so they include the plans the member bought. To fetch them again yourself, call refetchPlans(). |
checkoutOptions | GetCheckoutOptionsResponse$1 | Checkout options for the site’s events, from the Orders API (opens in a new tab), such as whether checkout accepts coupons and gift cards, in acceptCoupons and acceptGiftCards. An option the site doesn’t set is true. When loading the options fails, and always in an Event Item, acceptCoupons, acceptGiftCards, and premiumServices are all true. |
refetchTicketDefinitions | () => void | Fetches the event’s ticket definitions again, and updates ticketDefinitions. Call it after something changes ticket availability, such as a completed purchase, to show the current tickets. ticketDefinitions keeps its current value until the new list arrives. When the fetch fails, every value in the context stays as it was. In an Event Item, it does nothing. |
refetchPlans | () => void | Fetches the membership plans that apply to the event again, and updates plans and hasMemberships. The context already calls it when a site member logs in. Call it yourself after something else changes the plans, such as a plan purchase. plans keeps its current value until the new list arrives. When the fetch fails, plans becomes an empty array. In an Event Item, it does nothing. |
modal | ModalContextValue | Modal state that the components in the container share. It holds activeModal, the modal that’s open, or undefined, and the functions openModal(), openCustomModal(), and closeModal(). openCustomModal() takes a render function, which receives a function that closes the modal and returns the modal’s content. Opening a modal replaces any modal that’s open. The context holds only the modal’s state. The modal appears only when a component in the container renders it. |
id | string | Event ID. To retrieve or manage the event, use the Events V3 API (opens in a new tab). Empty when the container found no event. In the editor, a sample ID when the container found no event. |
slug | string | URL slug of the event, the last part of the URL of its details page. Empty when the container found no event. |
title | string | Name of the event. Empty when the container found no event. In the editor, a sample name when the event has none. |
shortTeaser | string | Short description of the event. Empty when the event has none. In the editor, a sample description instead, so check hasShortTeaser to know whether the event has its own. |
aboutTheEvent | RichContent$1 | Full description of the event, as a rich content document. It’s the event’s description from the Events V3 API (opens in a new tab). A document with no nodes when the event’s description has no content. In the editor, a sample description instead, so check hasAboutTheEvent to know whether the event has its own. |
image | ParsedMainImage | undefined | Main image of the event. Its alt text is the event’s name and is supplied automatically when an Image is connected. A placeholder image when the event has no main image, so check hasImage to know whether the event has its own. undefined when the container found no event, or when the event’s image can’t be read. In the editor, a sample image when the container found no event. |
startDate | string | Start date and time of the event, in the event’s time zone, as YYYY-MM-DDTHH:mm. For example, 2026-11-05T19:30. Empty when the date is to be announced or the event has no start date. In the editor, a sample date in those cases, so check hasDateAndTime to know whether the event has its own. |
endDate | string | End date and time of the event, in the event’s time zone, as YYYY-MM-DDTHH:mm. For example, 2026-11-05T22:00. Empty when the date is to be announced, the event hides its end date, or the event has no end date. In the editor, a sample date in those cases. |
dateAndTimeTbdMessage | string | Message the event shows instead of a date when the date is to be announced. Empty when the event has no message. In the editor, a sample message instead. |
address | string | Address of the event’s location, as a single line of text. When the location is to be announced, the location’s name instead. Empty when the event has no address. In the editor, a sample address when the event has no location. |
locationName | string | Name of the event’s location, such as the name of a venue. Empty when the location has no name. In the editor, a sample name when the event has no location. |
detailsPageLink | Link$1 | undefined | Link to the event’s details page, with its href and target. Where it leads depends on the event: - An event with ticket or RSVP registration, or one that shows its details page: the event’s details page, in the same tab, with target set to '_self'. - An event with external registration that hides its details page: the external registration page, in a new tab, with target set to '_blank'. - An event with no registration that hides its details button: a link with no href. undefined when the container found no event, or when the site has no event details page. |
registrationPageLink | Link$1 | undefined | Link to where visitors register for the event, with its href and target. Where it leads depends on how visitors register: - Tickets: the tickets section of the event’s details page, in the same tab, with target set to '_self'. - RSVP: the event’s registration page, in the same tab, with target set to '_self'. - An external site: the external registration page, in a new tab, with target set to '_blank'. - No registration: a link with no href. undefined when the container found no event, or when the site has no page to link to. |
registrationMessages | string | Notice about registration, for when visitors can’t register: - RSVP registration hasn’t opened yet: the date it opens. - The event has no registration: that registration isn’t required. - Registration is closed: the event’s registration-closed message. Empty otherwise, such as while registration is open, and when that date or message is missing. In the editor, a sample notice instead of an empty string. |
isTicketed | boolean | Whether visitors register for the event by buying tickets. |
isRecurring | boolean | Whether the event happens on multiple dates. |