Overview
Actions describe what happens when a user interacts with an element. They represent the semantic intent, not the technical implementation.Core Actions
navigate
Purpose: Links to a new page or section Use cases:- Menu items
- Product links
- Breadcrumbs
- “Learn More” buttons
Combine with
effect:navigate for full page loads or effect:modal for in-page navigationsubmit
Purpose: Submits form data or saves information Use cases:- Form submissions
- Settings updates
- Profile changes
- Data entry
add
Purpose: Adds an item to a collection Use cases:- Add to cart
- Add to wishlist
- Add to playlist
- Create new item
Usually paired with
effect:async since adding to a collection typically doesn’t navigate awayremove
Purpose: Removes an item from a collection Use cases:- Remove from cart
- Delete item
- Remove from list
- Unsubscribe
search
Purpose: Performs a search or query Use cases:- Search bars
- Query interfaces
- Lookup tools
filter
Purpose: Filters or narrows down content Use cases:- Category filters
- Sort options
- Faceted search
- Content refinement
auth
Purpose: Authentication-related actions Use cases:- Login
- Signup
- Logout
- Password reset
purchase
Purpose: Initiates a payment or checkout flow Use cases:- Checkout buttons
- Buy now
- Payment submission
- Order placement
Use
action:purchase for payment initiation. Use action:submit for the final payment form submission.Custom Actions
For domain-specific workflows, use thecustom. namespace:
Document custom actions in your API or developer documentation for AI agent builders
Choosing the Right Action
E-commerce Actions
E-commerce Actions
- Product page:
action:add(add to cart),action:purchase(buy now) - Cart page:
action:remove(remove item),action:purchase(checkout) - Checkout:
action:submit(payment form),action:auth(sign in)
Content Site Actions
Content Site Actions
- Search:
action:search(search bar) - Filters:
action:filter(categories, tags) - Navigation:
action:navigate(article links, pagination)
SaaS Dashboard Actions
SaaS Dashboard Actions
- Settings:
action:submit(save changes) - Data actions:
action:add(create),action:remove(delete) - Navigation:
action:navigate(between sections)
Forms Actions
Forms Actions
- Primary submit:
action:submit; primary:true - Cancel:
action:navigate - Delete/Remove:
action:remove
Best Practices
Use Semantic Actions
Choose actions that describe intent, not implementation.
action:add not action:click-buttonCombine with Effects
Always pair actions with effects to describe complete behavior
Mark Primary Actions
Use
primary:true for the main action in each contextCustom When Needed
Use custom namespace for domain-specific actions not covered by core vocabulary