# mood.cards > Lightweight contextual feedback cards for web apps. Drop a script tag, trigger feedback cards from your code, capture mood/rating/context with zero friction. ## Install Add before closing tag: Get your API key from the mood.cards dashboard after creating a project. ## JavaScript API MoodCards.show(triggerKey) MoodCards.show(triggerKey, { context: { plan: 'pro' }, anchor: '#checkout-btn' }) Show a triggered feedback card. Options: - context (any): client-owned data stored with the submission - anchor (string): CSS selector to position the card near MoodCards.setContext(obj) Set global context for all submissions. Merged with inline context. MoodCards.setAnchor(selector) Set default anchor for triggered cards. Overridden by inline anchor. MoodCards.reset() Clear visibility suppression state (localStorage/sessionStorage). MoodCards.destroy() Remove all rendered cards from the DOM. ## Card Types - Triggered: appears via MoodCards.show(), starts as a small preview bubble near the anchor, expands on hover/click, auto-dismisses after 8 seconds (configurable) - Persistent: always-available collapsed pill in bottom-right corner, expands on click, no trigger code needed ## Rating Types - stars (1-5 star rating) - emoji (5 emoji faces from angry to love) - thumbs (thumbs down, neutral, thumbs up) ## Visibility Modes Control how often a card shows per user: - always: every time triggered - once: only until first interaction (permanent localStorage flag) - session: once per browser session (sessionStorage) - cooldown: once, then suppressed for N days ## Positioning Cards position near the trigger action. Priority: 1. Inline anchor from .show({ anchor: '#btn' }) 2. Global anchor from .setAnchor() 3. Card config anchor (set in dashboard) 4. Last click position 5. Bottom-right corner (fallback) Add class="mc-avoid" to elements the card should never overlap. ## Privacy - No cookies, no IP logging, no server-side tracking - Anonymous UUID in localStorage for deduplication only - No cookie consent banner required - Context data is client responsibility ## Debug Mode Replace mc.js with mc_debug.js for: - [MoodCards] console logs for full lifecycle - Red dashed outlines around .mc-avoid zones - Unminified source for inspection