{"name":"chat-bubble","entry":"component","title":"ChatBubble","description":"Messages with optional speakers and tails, incoming/outgoing alignment, and three palette tones.","category":"UI","capabilities":[],"needsRemotion":false,"registryDependencies":["@jbm/tokens"],"install":"npx shadcn@latest add @jbm/chat-bubble","installName":"chat-bubble","page":"https://jbm-ui.bns.studio/c/chat-bubble","registryItem":"https://jbm-ui.bns.studio/r/chat-bubble.json","sourcePath":"registry/jbm/ui/chat-bubble.tsx","files":[{"source":"registry/jbm/ui/chat-bubble.tsx","target":"src/jbm/ui/chat-bubble.tsx","import":"@/jbm/ui/chat-bubble","type":"registry:ui"}],"endpoints":{"markdown":"https://jbm-ui.bns.studio/catalog/chat-bubble.md","json":"https://jbm-ui.bns.studio/catalog/chat-bubble.json"},"snippet":"import { ChatBubble } from \"@/jbm/ui/chat-bubble\"\n\n<ChatBubble speaker=\"Tú\" tone=\"ink\">¿Y si lo hacemos más sencillo?</ChatBubble>\n<ChatBubble speaker=\"La idea\" side=\"end\" tone=\"accent\">\n  Una pieza a la vez.\n</ChatBubble>","api":[{"export":"ChatBubble","kind":"component","summary":"One message bubble, sized to its content up to the container width, with an optional mono speaker line and a small tail under the aligned corner. The paper tone is card stock with the shared ink outline (stroke.outline) around body and tail as one line: each side of the tail curves out of the bottom edge through a small fillet and the edge opens where the tail leaves it. Ink and accent bubbles are edged in their own fill, so every tone has the same size. No chat state or typing simulation; callers choose the list or conversation semantics. Div attributes pass through.","props":[{"name":"side","type":"\"start\" | \"end\"","required":false,"default":"\"start\"","description":"\"start\" aligns the bubble and tail to the inline start (incoming); \"end\" to the inline end (outgoing). RTL-aware via logical margins."},{"name":"tone","type":"\"paper\" | \"ink\" | \"accent\"","required":false,"default":"\"paper\"","description":"Fill: \"paper\" (card stock with ink text and an ink outline), \"ink\", or \"accent\" (vermilion); ink and accent use cream text and no ink edge."},{"name":"tail","type":"boolean","required":false,"default":"true","description":"Shows the tail below the bubble: its sides leave the bottom edge 37 and 57px in from the aligned side and meet at a tip 40px in (the outer side leans slightly inward, never back under the corner), 12.5px below the bubble with its outline, which adds 13px bottom margin and a minimum width of 90px, so even a one-word message keeps the tail on the straight run of the bottom edge, clear of both rounded corners. False removes all three."},{"name":"speaker","type":"React.ReactNode","required":false,"default":null,"description":"Optional speaker name above the message, 11px mono. Omit (null/undefined) to hide."}],"passthrough":["React.HTMLAttributes<HTMLDivElement>"]}],"stage":{"mode":"fluid","reason":"Width fits the content up to 100% of the container (at least 90px with a tail); height is 16px top and bottom (13px padding inside the 3px edge) plus message lines at 18px × 1.5, an optional speaker line (11px + 6px gap), and 13px of margin for the tail when shown."},"examples":[{"title":"A short exchange","code":"import { ChatBubble } from \"@/jbm/ui/chat-bubble\"\n\n<ChatBubble speaker=\"Tú\" tone=\"ink\">¿Y si lo hacemos más sencillo?</ChatBubble>\n<ChatBubble speaker=\"La idea\" side=\"end\" tone=\"accent\">\n  Una pieza a la vez.\n</ChatBubble>"}],"qa":["Compare paper, ink, and accent tones on cream: text stays legible, the tail matches the bubble fill, and the paper bubble's ink edge runs around body and tail as one line.","Enlarge the paper bubble's tail at 8×: both sides curve out of the bottom edge without a step, gap, stub, or doubled edge, and no ink hairline crosses the opening.","Check start and end alignment: the tail leaves the bottom edge clear of the rounded corner, mirrored on the end side, and points toward that side. Repeat with a one-word message (\"Sí\") on both sides: the tail still sits on the straight bottom edge, never off a corner.","Turn off the tail and confirm the 13px gap below disappears.","Check a long unbroken message on a narrow screen wraps inside the bubble instead of overflowing."],"related":[{"name":"tokens","relation":"installs"},{"name":"burbuja","relation":"installed-by"}],"docs":[{"title":"Visual primitives guide","url":"https://jbm-ui.bns.studio/docs/visual-primitives.md"}],"setup":{"namespace":"@jbm","componentsJson":{"registries":{"@jbm":"https://jbm-ui.bns.studio/r/{name}.json"}},"command":"npx shadcn@latest add @jbm/<name>","target":"src/jbm/","importAlias":"@/jbm/…","tsconfigPaths":{"@/*":["./src/*"]}},"rules":["Install through the @jbm namespace: each registry item JSON (/r/<name>.json) carries its files' contents and each guide is served at /docs/<slug>.md, so agents never need the source repository (it is public on GitHub for people browsing the code).","Files install to src/jbm/ and import as @/jbm/…, which needs the @/* → ./src/* path alias in tsconfig.json.","Items marked needsRemotion require the remotion package and must render inside a Remotion composition or Player; every other item works in any React page.","Use one vermilion accent per composition; accent2 is for annotations only and soft is for dark surfaces only.","Stages are 1920×1080 landscape and 1080×1920 vertical with declared safe areas; each item's stage field declares its size in stage pixels, and scenes compose from YAML-shaped specs with @jbm/scene-spec."],"links":{"catalog":"https://jbm-ui.bns.studio/catalog.json","llms":"https://jbm-ui.bns.studio/llms.txt"}}