Component: Workshop Card #7
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Workshop Card Artifact
A rich event/workshop card component for displaying scheduled events, meetings, webinars, and workshops with attendee information and action buttons.
Installation
Install the workshop card artifact using the HAX CLI:
Dependencies
This artifact requires the following peer dependencies:
@copilotkit/react-core- For the action hooklucide-react- For iconszod- For schema validationclass-variance-authority- For button variantsAll required UI components (Button, Badge, Avatar) are included locally and will be installed automatically with the artifact.
Usage
1. Import the components
2. Register the action hook
In your main app or artifact provider component:
3. Render the component
Schema
The workshop card uses the following Zod schema for validation:
Props
titlestringdescriptionstringundefinedeventTypestring"Online Event"status"confirmed" | "pending" | "cancelled""confirmed"datestringundefinedtimestringundefineddurationstringundefinedlocationstringundefinedattendeeCountnumber0attendeesAttendee[][]maxDisplayedAttendeesnumber3showJoinButtonbooleantrueshowDeclineButtonbooleantrueshowMaybeButtonbooleantrueonJoin() => voidundefinedonDecline() => voidundefinedonMaybe() => voidundefinedonAddToCalendar() => voidundefinedAction
The
useWorkshopCardActionhook registers a CopilotKit action namedshow_workshop_cardthat allows the AI to display workshop cards.Action Name
show_workshop_cardAction Parameters
titlestringdescriptionstringeventTypestringstatusstringdatestringtimestringdurationstringlocationstringattendeeCountnumberattendeesobject[]showJoinButtonbooleanshowDeclineButtonbooleanshowMaybeButtonbooleanExample
Exported Components
HAXWorkshopCard- Main workshop card componentEventDetailItem- Individual detail row componentAvatarStack- Attendee avatar stack componentStatusBadge- Status badge componentActionButton- Action button componentdefaultStatusConfigs- Default status configurations