SDK Reference
The AI agent generates code using the HubSpot UI Extension SDK. This reference covers the key components, hooks, and patterns available. You do not need to know these details to use Palpaca — the agent handles the code — but understanding them helps you write better prompts and review generated output.
Component Categories
Section titled “Component Categories”The SDK provides 40 components organized into eight categories:
| Category | Examples | Use Case |
|---|---|---|
| Layout | Flex, Box, Tile, Divider | Structure and spacing |
| Navigation | Link, Button, StepIndicator | User actions and navigation |
| Data Display | Text, Tag, Badge, DescriptionList, Table | Showing information |
| Inputs | Input, Select, DateInput, Toggle, NumberInput | Collecting user input |
| Feedback | Alert, LoadingSpinner, EmptyState, ProgressBar | Status and feedback |
| Overlays | Modal, Panel, Tooltip | Layered content |
| Charts | BarChart, LineChart, DonutChart | Data visualization |
| CRM | CrmAssociationTable, CrmActionButton, CrmStageTracker | HubSpot-specific widgets |
Browse the full list in the Gallery tab in the top bar.
Key Hooks
Section titled “Key Hooks”hubspot.fetchCrmObjectProperties()
Section titled “hubspot.fetchCrmObjectProperties()”Fetches properties from the current CRM record.
hubspot.fetchCrmObjectProperties(objectType, properties)Returns the requested property values for the record the card is displayed on.
hubspot.serverless()
Section titled “hubspot.serverless()”Calls a serverless function to perform backend operations like creating records, updating data, or calling external APIs.
actions.openIframe()
Section titled “actions.openIframe()”Opens a modal iframe within HubSpot for more complex interactions.
actions.addAlert()
Section titled “actions.addAlert()”Displays a notification toast to the user with success, warning, or error messages.
Event Handling
Section titled “Event Handling”Cards can respond to user interactions through standard event handlers on SDK components:
- onClick — button clicks and tappable elements
- onChange — input value changes
- onSubmit — form submissions
The agent generates these handlers automatically based on your prompt descriptions.
Styling
Section titled “Styling”SDK components follow the HubSpot design system. You can customize appearance through:
- Variant props — many components accept a
variantprop for different visual styles - Flex and Box — layout components for controlling spacing, alignment, and direction
- Inline styles — for fine-grained control when component props are not enough
The agent uses these patterns to match the look and feel you describe in your prompts.