[{"data":1,"prerenderedAt":1408},["ShallowReactive",2],{"navigation":3,"$fMW9jOOkNpZriWVK3P_bZYNOyYR2IEPvrHsC7cDBlJJc":446,"/docs/components/attachment":459,"surround-/docs/components/attachment":1405},[4],{"title":5,"path":6,"stem":7,"children":8,"page":18},"Docs","/docs","docs",[9,294,320,338,351,377,390],{"title":10,"path":11,"stem":12,"children":13,"new":18,"type":293},"Components","/docs/components","docs/02.components",[14,20,24,28,32,37,41,45,49,53,57,61,65,69,73,77,81,85,89,93,97,101,105,109,113,117,121,125,129,133,137,141,145,149,153,157,161,165,169,173,177,181,185,189,193,197,201,205,209,213,217,221,225,229,233,237,241,245,249,253,257,261,265,269,273,277,281,285,289],{"title":15,"path":16,"stem":17,"new":18,"type":19,"children":-1},"Accordion","/docs/components/accordion","docs/components/accordion",false,"component",{"title":21,"path":22,"stem":23,"new":18,"type":19,"children":-1},"Alert","/docs/components/alert","docs/components/alert",{"title":25,"path":26,"stem":27,"new":18,"type":19,"children":-1},"Alert Dialog","/docs/components/alert-dialog","docs/components/alert-dialog",{"title":29,"path":30,"stem":31,"new":18,"type":19,"children":-1},"Aspect Ratio","/docs/components/aspect-ratio","docs/components/aspect-ratio",{"title":33,"path":34,"stem":35,"new":36,"type":19,"children":-1},"Attachment","/docs/components/attachment","docs/components/attachment",true,{"title":38,"path":39,"stem":40,"new":18,"type":19,"children":-1},"Avatar","/docs/components/avatar","docs/components/avatar",{"title":42,"path":43,"stem":44,"new":18,"type":19,"children":-1},"Badge","/docs/components/badge","docs/components/badge",{"title":46,"path":47,"stem":48,"new":18,"type":19,"children":-1},"Breadcrumb","/docs/components/breadcrumb","docs/components/breadcrumb",{"title":50,"path":51,"stem":52,"new":36,"type":19,"children":-1},"Bubble","/docs/components/bubble","docs/components/bubble",{"title":54,"path":55,"stem":56,"new":18,"type":19,"children":-1},"Button","/docs/components/button","docs/components/button",{"title":58,"path":59,"stem":60,"new":18,"type":19,"children":-1},"Button Group","/docs/components/button-group","docs/components/button-group",{"title":62,"path":63,"stem":64,"new":18,"type":19,"children":-1},"Calendar","/docs/components/calendar","docs/components/calendar",{"title":66,"path":67,"stem":68,"new":18,"type":19,"children":-1},"Card","/docs/components/card","docs/components/card",{"title":70,"path":71,"stem":72,"new":18,"type":19,"children":-1},"Carousel","/docs/components/carousel","docs/components/carousel",{"title":74,"path":75,"stem":76,"new":18,"type":19,"children":-1},"Chart","/docs/components/chart","docs/components/chart",{"title":78,"path":79,"stem":80,"new":18,"type":19,"children":-1},"Checkbox","/docs/components/checkbox","docs/components/checkbox",{"title":82,"path":83,"stem":84,"new":18,"type":19,"children":-1},"Collapsible","/docs/components/collapsible","docs/components/collapsible",{"title":86,"path":87,"stem":88,"new":18,"type":19,"children":-1},"Combobox","/docs/components/combobox","docs/components/combobox",{"title":90,"path":91,"stem":92,"new":18,"type":19,"children":-1},"Command","/docs/components/command","docs/components/command",{"title":94,"path":95,"stem":96,"new":18,"type":19,"children":-1},"Context Menu","/docs/components/context-menu","docs/components/context-menu",{"title":98,"path":99,"stem":100,"new":18,"type":19,"children":-1},"Data Table","/docs/components/data-table","docs/components/data-table",{"title":102,"path":103,"stem":104,"new":18,"type":19,"children":-1},"Date Picker","/docs/components/date-picker","docs/components/date-picker",{"title":106,"path":107,"stem":108,"new":18,"type":19,"children":-1},"Dialog","/docs/components/dialog","docs/components/dialog",{"title":110,"path":111,"stem":112,"new":18,"type":19,"children":-1},"Drawer","/docs/components/drawer","docs/components/drawer",{"title":114,"path":115,"stem":116,"new":18,"type":19,"children":-1},"Dropdown Menu","/docs/components/dropdown-menu","docs/components/dropdown-menu",{"title":118,"path":119,"stem":120,"new":18,"type":19,"children":-1},"Empty","/docs/components/empty","docs/components/empty",{"title":122,"path":123,"stem":124,"new":18,"type":19,"children":-1},"Field","/docs/components/field","docs/components/field",{"title":126,"path":127,"stem":128,"new":18,"type":19,"children":-1},"Form","/docs/components/form","docs/components/form",{"title":130,"path":131,"stem":132,"new":18,"type":19,"children":-1},"Hover Card","/docs/components/hover-card","docs/components/hover-card",{"title":134,"path":135,"stem":136,"new":18,"type":19,"children":-1},"Input","/docs/components/input","docs/components/input",{"title":138,"path":139,"stem":140,"new":18,"type":19,"children":-1},"Input Group","/docs/components/input-group","docs/components/input-group",{"title":142,"path":143,"stem":144,"new":18,"type":19,"children":-1},"Input OTP","/docs/components/input-otp","docs/components/input-otp",{"title":146,"path":147,"stem":148,"new":18,"type":19,"children":-1},"Item","/docs/components/item","docs/components/item",{"title":150,"path":151,"stem":152,"new":18,"type":19,"children":-1},"Kbd","/docs/components/kbd","docs/components/kbd",{"title":154,"path":155,"stem":156,"new":18,"type":19,"children":-1},"Label","/docs/components/label","docs/components/label",{"title":158,"path":159,"stem":160,"new":36,"type":19,"children":-1},"Marker","/docs/components/marker","docs/components/marker",{"title":162,"path":163,"stem":164,"new":18,"type":19,"children":-1},"Menubar","/docs/components/menubar","docs/components/menubar",{"title":166,"path":167,"stem":168,"new":36,"type":19,"children":-1},"Message","/docs/components/message","docs/components/message",{"title":170,"path":171,"stem":172,"new":36,"type":19,"children":-1},"Message Scroller","/docs/components/message-scroller","docs/components/message-scroller",{"title":174,"path":175,"stem":176,"new":18,"type":19,"children":-1},"Native Select","/docs/components/native-select","docs/components/native-select",{"title":178,"path":179,"stem":180,"new":18,"type":19,"children":-1},"Navigation Menu","/docs/components/navigation-menu","docs/components/navigation-menu",{"title":182,"path":183,"stem":184,"new":18,"type":19,"children":-1},"Number Field","/docs/components/number-field","docs/components/number-field",{"title":186,"path":187,"stem":188,"new":18,"type":19,"children":-1},"Pagination","/docs/components/pagination","docs/components/pagination",{"title":190,"path":191,"stem":192,"new":18,"type":19,"children":-1},"Pin Input","/docs/components/pin-input","docs/components/pin-input",{"title":194,"path":195,"stem":196,"new":18,"type":19,"children":-1},"Popover","/docs/components/popover","docs/components/popover",{"title":198,"path":199,"stem":200,"new":18,"type":19,"children":-1},"Progress","/docs/components/progress","docs/components/progress",{"title":202,"path":203,"stem":204,"new":18,"type":19,"children":-1},"Radio Group","/docs/components/radio-group","docs/components/radio-group",{"title":206,"path":207,"stem":208,"new":18,"type":19,"children":-1},"Range Calendar","/docs/components/range-calendar","docs/components/range-calendar",{"title":210,"path":211,"stem":212,"new":18,"type":19,"children":-1},"Resizable","/docs/components/resizable","docs/components/resizable",{"title":214,"path":215,"stem":216,"new":18,"type":19,"children":-1},"Scroll Area","/docs/components/scroll-area","docs/components/scroll-area",{"title":218,"path":219,"stem":220,"new":18,"type":19,"children":-1},"Select","/docs/components/select","docs/components/select",{"title":222,"path":223,"stem":224,"new":18,"type":19,"children":-1},"Separator","/docs/components/separator","docs/components/separator",{"title":226,"path":227,"stem":228,"new":18,"type":19,"children":-1},"Sheet","/docs/components/sheet","docs/components/sheet",{"title":230,"path":231,"stem":232,"new":18,"type":19,"children":-1},"Sidebar","/docs/components/sidebar","docs/components/sidebar",{"title":234,"path":235,"stem":236,"new":18,"type":19,"children":-1},"Skeleton","/docs/components/skeleton","docs/components/skeleton",{"title":238,"path":239,"stem":240,"new":18,"type":19,"children":-1},"Slider","/docs/components/slider","docs/components/slider",{"title":242,"path":243,"stem":244,"new":18,"type":19,"children":-1},"Sonner","/docs/components/sonner","docs/components/sonner",{"title":246,"path":247,"stem":248,"new":18,"type":19,"children":-1},"Spinner","/docs/components/spinner","docs/components/spinner",{"title":250,"path":251,"stem":252,"new":18,"type":19,"children":-1},"Stepper","/docs/components/stepper","docs/components/stepper",{"title":254,"path":255,"stem":256,"new":18,"type":19,"children":-1},"Switch","/docs/components/switch","docs/components/switch",{"title":258,"path":259,"stem":260,"new":18,"type":19,"children":-1},"Table","/docs/components/table","docs/components/table",{"title":262,"path":263,"stem":264,"new":18,"type":19,"children":-1},"Tabs","/docs/components/tabs","docs/components/tabs",{"title":266,"path":267,"stem":268,"new":18,"type":19,"children":-1},"Tags Input","/docs/components/tags-input","docs/components/tags-input",{"title":270,"path":271,"stem":272,"new":18,"type":19,"children":-1},"Textarea","/docs/components/textarea","docs/components/textarea",{"title":274,"path":275,"stem":276,"new":18,"type":19,"children":-1},"Toast","/docs/components/toast","docs/components/toast",{"title":278,"path":279,"stem":280,"new":18,"type":19,"children":-1},"Toggle","/docs/components/toggle","docs/components/toggle",{"title":282,"path":283,"stem":284,"new":18,"type":19,"children":-1},"Toggle Group","/docs/components/toggle-group","docs/components/toggle-group",{"title":286,"path":287,"stem":288,"new":18,"type":19,"children":-1},"Tooltip","/docs/components/tooltip","docs/components/tooltip",{"title":290,"path":291,"stem":292,"new":18,"type":19,"children":-1},"Typography","/docs/components/typography","docs/components/typography","group",{"title":295,"path":296,"stem":297,"children":298,"new":18,"type":293},"Installation","/docs/installation","docs/02.installation",[299,304,308,312,316],{"title":300,"path":301,"stem":302,"new":18,"type":303,"children":-1},"Vite","/docs/installation/vite","docs/installation/01.vite","page",{"title":305,"path":306,"stem":307,"new":18,"type":303,"children":-1},"Nuxt","/docs/installation/nuxt","docs/installation/02.nuxt",{"title":309,"path":310,"stem":311,"new":18,"type":303,"children":-1},"Astro","/docs/installation/astro","docs/installation/03.astro",{"title":313,"path":314,"stem":315,"new":18,"type":303,"children":-1},"Laravel","/docs/installation/laravel","docs/installation/04.laravel",{"title":317,"path":318,"stem":319,"new":18,"type":303,"children":-1},"Manual Installation","/docs/installation/manual","docs/installation/05.manual",{"title":321,"path":322,"stem":323,"children":324,"new":18,"type":293},"Dark Mode","/docs/dark-mode","docs/05.dark-mode",[325,328,331,335],{"title":300,"path":326,"stem":327,"new":18,"type":303,"children":-1},"/docs/dark-mode/vite","docs/dark-mode/01.vite",{"title":305,"path":329,"stem":330,"new":18,"type":303,"children":-1},"/docs/dark-mode/nuxt","docs/dark-mode/02.nuxt",{"title":332,"path":333,"stem":334,"new":18,"type":303,"children":-1},"Vitepress","/docs/dark-mode/vitepress","docs/dark-mode/03.vitepress",{"title":309,"path":336,"stem":337,"new":18,"type":303,"children":-1},"/docs/dark-mode/astro","docs/dark-mode/04.astro",{"title":339,"path":340,"stem":341,"children":342,"new":18,"type":293},"Forms","/docs/forms","docs/forms",[343,347],{"title":344,"path":345,"stem":346,"new":18,"type":303,"children":-1},"VeeValidate","/docs/forms/vee-validate","docs/forms/01.vee-validate",{"title":348,"path":349,"stem":350,"new":18,"type":303,"children":-1},"TanStack Form","/docs/forms/tanstack-form","docs/forms/02.tanstack-form",{"title":352,"path":353,"stem":354,"children":355,"new":18,"type":293},"Registry","/docs/registry","docs/registry/index",[356,357,361,365,369,373],{"title":352,"path":353,"stem":354,"new":18,"type":303,"children":-1},{"title":358,"path":359,"stem":360,"new":18,"type":303,"children":-1},"Examples","/docs/registry/examples","docs/registry/examples",{"title":362,"path":363,"stem":364,"new":18,"type":303,"children":-1},"FAQ","/docs/registry/faq","docs/registry/faq",{"title":366,"path":367,"stem":368,"new":18,"type":303,"children":-1},"Getting Started","/docs/registry/getting-started","docs/registry/getting-started",{"title":370,"path":371,"stem":372,"new":18,"type":303,"children":-1},"registry-item.json","/docs/registry/registry-item-json","docs/registry/registry-item-json",{"title":374,"path":375,"stem":376,"new":18,"type":303,"children":-1},"registry.json","/docs/registry/registry-json","docs/registry/registry-json",{"title":378,"path":379,"stem":380,"children":381,"page":18,"type":293},"Utilities","/docs/utilities","docs/utilities",[382,386],{"title":383,"path":384,"stem":385,"new":18,"type":303,"children":-1},"scroll-fade","/docs/utilities/scroll-fade","docs/utilities/scroll-fade",{"title":387,"path":388,"stem":389,"new":18,"type":303,"children":-1},"shimmer","/docs/utilities/shimmer","docs/utilities/shimmer",{"path":6,"stem":7,"title":391,"type":293,"children":392},"Get Started",[393,397,404,408,412,418,422,426,430,434,438,442],{"title":394,"path":395,"stem":396,"new":18,"type":303,"children":-1},"Introduction","/docs/introduction","docs/01.introduction",{"title":295,"path":296,"stem":297,"children":398,"new":18,"type":293},[399,400,401,402,403],{"title":300,"path":301,"stem":302,"new":18,"type":303,"children":-1},{"title":305,"path":306,"stem":307,"new":18,"type":303,"children":-1},{"title":309,"path":310,"stem":311,"new":18,"type":303,"children":-1},{"title":313,"path":314,"stem":315,"new":18,"type":303,"children":-1},{"title":317,"path":318,"stem":319,"new":18,"type":303,"children":-1},{"title":405,"path":406,"stem":407,"new":18,"type":303,"children":-1},"components.json","/docs/components-json","docs/03.components-json",{"title":409,"path":410,"stem":411,"new":18,"type":303,"children":-1},"Theming","/docs/theming","docs/04.theming",{"title":321,"path":322,"stem":323,"children":413,"new":18,"type":293},[414,415,416,417],{"title":300,"path":326,"stem":327,"new":18,"type":303,"children":-1},{"title":305,"path":329,"stem":330,"new":18,"type":303,"children":-1},{"title":332,"path":333,"stem":334,"new":18,"type":303,"children":-1},{"title":309,"path":336,"stem":337,"new":18,"type":303,"children":-1},{"title":419,"path":420,"stem":421,"new":18,"type":303,"children":-1},"CLI","/docs/cli","docs/06.cli",{"title":423,"path":424,"stem":425,"new":18,"type":303,"children":-1},"JavaScript","/docs/javascript","docs/07.javascript",{"title":427,"path":428,"stem":429,"new":18,"type":303,"children":-1},"Figma","/docs/figma","docs/09.figma",{"title":431,"path":432,"stem":433,"new":18,"type":303,"children":-1},"Changelog","/docs/changelog","docs/10.changelog",{"title":435,"path":436,"stem":437,"new":18,"type":303,"children":-1},"Legacy Docs","/docs/legacy","docs/11.legacy",{"title":439,"path":440,"stem":441,"new":18,"type":303,"children":-1},"Skills","/docs/skills","docs/skills",{"title":378,"path":379,"stem":380,"children":443,"page":18,"type":293},[444,445],{"title":383,"path":384,"stem":385,"new":18,"type":303,"children":-1},{"title":387,"path":388,"stem":389,"new":18,"type":303,"children":-1},{"repo":447},{"id":448,"name":449,"repo":450,"description":451,"createdAt":452,"updatedAt":453,"pushedAt":454,"stars":455,"watchers":456,"forks":457,"defaultBranch":458},658791894,"shadcn-vue","unovue/shadcn-vue","Vue port of shadcn-ui","2023-06-26T13:53:23Z","2026-07-10T15:52:04Z","2026-07-10T15:50:34Z",10260,37,665,"dev",{"id":460,"title":33,"body":461,"description":1398,"extension":1399,"links":1400,"meta":1401,"navigation":36,"new":36,"path":34,"rawbody":1402,"seo":1403,"stem":35,"__hash__":1404},"content/docs/components/attachment.md",{"type":462,"value":463,"toc":1366},"minimark",[464,468,476,480,535,539,548,552,555,563,570,576,580,634,637,642,660,663,667,682,685,689,705,708,711,717,720,724,730,733,739,743,762,766,775,781,785,793,799,808,812,827,831,840,844,847,850,951,954,957,1010,1014,1017,1048,1052,1060,1091,1094,1097,1128,1132,1135,1166,1169,1179,1248,1251,1259,1329,1332,1335],[465,466],"component-preview",{"name":467},"AttachmentDemo",[469,470,471,472,475],"p",{},"The ",[473,474,33],"code",{}," component displays a file or image attachment, its media, name, and metadata, with optional actions and upload state. Use it for files and images in chat composers, message threads, and upload lists.",[477,478,295],"h2",{"id":479},"installation",[481,482,483,498,511],"code-tabs",{},[484,485,486,492],"tabs-list",{},[487,488,490],"tabs-trigger",{"value":489},"cli",[469,491,419],{},[487,493,495],{"value":494},"manual",[469,496,497],{},"Manual",[499,500,501],"tabs-content",{"value":489},[502,503,509],"pre",{"className":504,"code":506,"language":507,"meta":508},[505],"language-bash","npx shadcn-vue@latest add attachment\n","bash","",[473,510,506],{"__ignoreMap":508},[499,512,513],{"value":494},[514,515,516,530],"steps",{},[517,518,519],"step",{},[469,520,521,522,529],{},"Copy and paste the ",[523,524,528],"a",{"href":525,"rel":526},"https://github.com/unovue/shadcn-vue/tree/dev/apps/v4/registry/bases/reka/ui/attachment",[527],"nofollow","GitHub source code"," into your project.",[517,531,532],{},[469,533,534],{},"Update the import paths to match your project setup.",[477,536,538],{"id":537},"usage","Usage",[502,540,546],{"className":541,"code":543,"language":544,"meta":545},[542],"language-vue","\u003Cscript setup lang=\"ts\">\nimport { FileTextIcon, XIcon } from '@lucide/vue'\nimport {\n  Attachment,\n  AttachmentAction,\n  AttachmentActions,\n  AttachmentContent,\n  AttachmentDescription,\n  AttachmentMedia,\n  AttachmentTitle,\n} from '@/components/ui/attachment'\n\u003C/script>\n\n\u003Ctemplate>\n  \u003CAttachment>\n    \u003CAttachmentMedia>\n      \u003CFileTextIcon />\n    \u003C/AttachmentMedia>\n    \u003CAttachmentContent>\n      \u003CAttachmentTitle>sales-dashboard.pdf\u003C/AttachmentTitle>\n      \u003CAttachmentDescription>PDF · 2.4 MB\u003C/AttachmentDescription>\n    \u003C/AttachmentContent>\n    \u003CAttachmentActions>\n      \u003CAttachmentAction aria-label=\"Remove sales-dashboard.pdf\">\n        \u003CXIcon />\n      \u003C/AttachmentAction>\n    \u003C/AttachmentActions>\n  \u003C/Attachment>\n\u003C/template>\n","vue","showLineNumbers",[473,547,543],{"__ignoreMap":508},[477,549,551],{"id":550},"composition","Composition",[469,553,554],{},"Use the following composition to build an attachment:",[502,556,561],{"className":557,"code":559,"language":560,"meta":508},[558],"language-text","Attachment\n├── AttachmentMedia\n├── AttachmentContent\n│   ├── AttachmentTitle\n│   └── AttachmentDescription\n├── AttachmentActions\n│   └── AttachmentAction\n└── AttachmentTrigger\n","text",[473,562,559],{"__ignoreMap":508},[469,564,565,566,569],{},"Use ",[473,567,568],{},"AttachmentGroup"," to lay out multiple attachments in a scrollable row:",[502,571,574],{"className":572,"code":573,"language":560,"meta":508},[558],"AttachmentGroup\n├── Attachment\n└── Attachment\n",[473,575,573],{"__ignoreMap":508},[477,577,579],{"id":578},"features","Features",[581,582,583,590,611,614,621,627],"ul",{},[584,585,586,587],"li",{},"Icon and image media through ",[473,588,589],{},"AttachmentMedia",[584,591,592,593,596,597,596,600,596,603,606,607,610],{},"Upload states: ",[473,594,595],{},"idle",", ",[473,598,599],{},"uploading",[473,601,602],{},"processing",[473,604,605],{},"error",", and ",[473,608,609],{},"done"," with built-in styling and a shimmer while in progress",[584,612,613],{},"Three sizes and horizontal or vertical orientation",[584,615,616,617,620],{},"A full-card ",[473,618,619],{},"AttachmentTrigger"," that opens a link or dialog while the actions stay independently clickable",[584,622,623,624,626],{},"Scrollable, snapping ",[473,625,568],{}," with an edge fade",[584,628,629,630,633],{},"Customizable styling through the Vue ",[473,631,632],{},"class"," attribute on every part",[477,635,358],{"id":636},"examples",[638,639,641],"h3",{"id":640},"image","Image",[469,643,644,645,648,649,651,652,655,656,659],{},"Set ",[473,646,647],{},"variant=\"image\""," on ",[473,650,589],{}," and render an ",[473,653,654],{},"\u003Cimg>"," inside it. Use ",[473,657,658],{},"orientation=\"vertical\""," to stack the media above the content.",[465,661],{"name":662},"AttachmentImageDemo",[638,664,666],{"id":665},"states","States",[469,668,644,669,672,673,675,676,678,679,681],{},[473,670,671],{},"state"," to reflect the upload lifecycle. ",[473,674,599],{}," and ",[473,677,602],{}," shimmer the title, and ",[473,680,605],{}," switches to a destructive treatment.",[465,683],{"name":684},"AttachmentStatesDemo",[638,686,688],{"id":687},"sizes","Sizes",[469,690,565,691,694,695,596,698,606,701,704],{},[473,692,693],{},"size"," to switch between ",[473,696,697],{},"default",[473,699,700],{},"sm",[473,702,703],{},"xs",".",[465,706],{"name":707},"AttachmentSizesDemo",[638,709,710],{"id":293},"Group",[469,712,713,714,716],{},"Wrap attachments in ",[473,715,568],{}," to lay them out in a horizontally scrollable, snapping row with an edge fade.",[465,718],{"name":719},"AttachmentGroupDemo",[638,721,723],{"id":722},"trigger","Trigger",[469,725,726,727,729],{},"Add an ",[473,728,619],{}," to make the whole card open a link or dialog. It fills the card behind the actions, so the actions stay clickable.",[465,731],{"name":732},"AttachmentTriggerDemo",[502,734,737],{"className":735,"code":736,"language":544,"meta":545},[542],"\u003Ctemplate>\n  \u003CDialog>\n    \u003CAttachment>\n      \u003C!-- media, content, actions -->\n      \u003CDialogTrigger as-child>\n        \u003CAttachmentTrigger aria-label=\"Preview research-summary.pdf\" />\n      \u003C/DialogTrigger>\n    \u003C/Attachment>\n    \u003CDialogContent>\n      \u003C!-- ... -->\n    \u003C/DialogContent>\n  \u003C/Dialog>\n\u003C/template>\n",[473,738,736],{"__ignoreMap":508},[477,740,742],{"id":741},"accessibility","Accessibility",[469,744,745,748,749,606,751,753,754,757,758,761],{},[473,746,747],{},"AttachmentAction"," renders a ",[473,750,54],{},[473,752,619],{}," renders a real ",[473,755,756],{},"\u003Cbutton>"," (or your element via ",[473,759,760],{},"as-child","). Follow the guidance below so both are operable and announced.",[638,763,765],{"id":764},"label-icon-only-actions","Label icon-only actions",[469,767,768,770,771,774],{},[473,769,747],{}," is usually icon-only, so give each one an ",[473,772,773],{},"aria-label"," describing the action and its target.",[502,776,779],{"className":777,"code":778,"language":544,"meta":545},[542],"\u003Ctemplate>\n  \u003CAttachmentAction aria-label=\"Remove sales-dashboard.pdf\">\n    \u003CXIcon />\n  \u003C/AttachmentAction>\n\u003C/template>\n",[473,780,778],{"__ignoreMap":508},[638,782,784],{"id":783},"label-the-trigger","Label the trigger",[469,786,787,789,790,792],{},[473,788,619],{}," covers the card with no text of its own, so give it an ",[473,791,773],{}," for what activating it does.",[502,794,797],{"className":795,"code":796,"language":544,"meta":545},[542],"\u003Ctemplate>\n  \u003CAttachmentTrigger as-child>\n    \u003Ca\n      :href=\"url\"\n      target=\"_blank\"\n      rel=\"noreferrer\"\n      aria-label=\"Open workspace.png\"\n    />\n  \u003C/AttachmentTrigger>\n\u003C/template>\n",[473,798,796],{"__ignoreMap":508},[469,800,801,802,804,805,807],{},"The trigger sits behind the actions in the stacking order, so an ",[473,803,747],{}," and the ",[473,806,619],{}," never trap each other — both remain separately focusable and clickable.",[638,809,811],{"id":810},"keyboard-scrolling","Keyboard scrolling",[469,813,814,815,817,818,596,821,824,825,704],{},"An ",[473,816,568],{}," scrolls horizontally. When its attachments are interactive: a trigger or actions, keyboard users reach off-screen items by tabbing to them. For a row of presentational attachments, make the group itself focusable and scrollable by adding ",[473,819,820],{},"tabindex=\"0\"",[473,822,823],{},"role=\"group\"",", and an ",[473,826,773],{},[638,828,830],{"id":829},"meaning-beyond-color","Meaning beyond color",[469,832,471,833,835,836,839],{},[473,834,605],{}," state uses a destructive color. Keep the failure reason in ",[473,837,838],{},"AttachmentDescription"," so the state is not conveyed by color alone.",[477,841,843],{"id":842},"api-reference","API Reference",[638,845,33],{"id":846},"attachment",[469,848,849],{},"The root attachment container.",[851,852,853,872],"table",{},[854,855,856],"thead",{},[857,858,859,863,866,869],"tr",{},[860,861,862],"th",{},"Prop",[860,864,865],{},"Type",[860,867,868],{},"Default",[860,870,871],{},"Description",[873,874,875,895,914,934],"tbody",{},[857,876,877,882,887,892],{},[878,879,880],"td",{},[473,881,671],{},[878,883,884],{},[473,885,886],{},"\"idle\" | \"uploading\" | \"processing\" | \"error\" | \"done\"",[878,888,889],{},[473,890,891],{},"\"done\"",[878,893,894],{},"The upload state. Drives styling and the shimmer.",[857,896,897,901,906,911],{},[878,898,899],{},[473,900,693],{},[878,902,903],{},[473,904,905],{},"\"default\" | \"sm\" | \"xs\"",[878,907,908],{},[473,909,910],{},"\"default\"",[878,912,913],{},"The attachment size.",[857,915,916,921,926,931],{},[878,917,918],{},[473,919,920],{},"orientation",[878,922,923],{},[473,924,925],{},"\"horizontal\" | \"vertical\"",[878,927,928],{},[473,929,930],{},"\"horizontal\"",[878,932,933],{},"Lay the media beside or above the content.",[857,935,936,940,945,948],{},[878,937,938],{},[473,939,632],{},[878,941,942],{},[473,943,944],{},"HTMLAttributes[\"class\"]",[878,946,947],{},"-",[878,949,950],{},"Additional classes to apply to the root element.",[638,952,589],{"id":953},"attachmentmedia",[469,955,956],{},"The media slot for an icon or image preview.",[851,958,959,971],{},[854,960,961],{},[857,962,963,965,967,969],{},[860,964,862],{},[860,966,865],{},[860,968,868],{},[860,970,871],{},[873,972,973,995],{},[857,974,975,980,985,990],{},[878,976,977],{},[473,978,979],{},"variant",[878,981,982],{},[473,983,984],{},"\"icon\" | \"image\"",[878,986,987],{},[473,988,989],{},"\"icon\"",[878,991,992,993,704],{},"Whether the media holds an icon or an ",[473,994,654],{},[857,996,997,1001,1005,1007],{},[878,998,999],{},[473,1000,632],{},[878,1002,1003],{},[473,1004,944],{},[878,1006,947],{},[878,1008,1009],{},"Additional classes to apply to the media slot.",[638,1011,1013],{"id":1012},"attachmentcontent","AttachmentContent",[469,1015,1016],{},"Wraps the title and description.",[851,1018,1019,1031],{},[854,1020,1021],{},[857,1022,1023,1025,1027,1029],{},[860,1024,862],{},[860,1026,865],{},[860,1028,868],{},[860,1030,871],{},[873,1032,1033],{},[857,1034,1035,1039,1043,1045],{},[878,1036,1037],{},[473,1038,632],{},[878,1040,1041],{},[473,1042,944],{},[878,1044,947],{},[878,1046,1047],{},"Additional classes to apply to the content slot.",[638,1049,1051],{"id":1050},"attachmenttitle","AttachmentTitle",[469,1053,1054,1055,1057,1058,704],{},"The attachment name. Shimmers while the attachment is ",[473,1056,599],{}," or ",[473,1059,602],{},[851,1061,1062,1074],{},[854,1063,1064],{},[857,1065,1066,1068,1070,1072],{},[860,1067,862],{},[860,1069,865],{},[860,1071,868],{},[860,1073,871],{},[873,1075,1076],{},[857,1077,1078,1082,1086,1088],{},[878,1079,1080],{},[473,1081,632],{},[878,1083,1084],{},[473,1085,944],{},[878,1087,947],{},[878,1089,1090],{},"Additional classes to apply to the title.",[638,1092,838],{"id":1093},"attachmentdescription",[469,1095,1096],{},"Secondary metadata such as the file type, size, or upload status.",[851,1098,1099,1111],{},[854,1100,1101],{},[857,1102,1103,1105,1107,1109],{},[860,1104,862],{},[860,1106,865],{},[860,1108,868],{},[860,1110,871],{},[873,1112,1113],{},[857,1114,1115,1119,1123,1125],{},[878,1116,1117],{},[473,1118,632],{},[878,1120,1121],{},[473,1122,944],{},[878,1124,947],{},[878,1126,1127],{},"Additional classes to apply to the description.",[638,1129,1131],{"id":1130},"attachmentactions","AttachmentActions",[469,1133,1134],{},"A container for one or more actions, aligned to the end of the attachment.",[851,1136,1137,1149],{},[854,1138,1139],{},[857,1140,1141,1143,1145,1147],{},[860,1142,862],{},[860,1144,865],{},[860,1146,868],{},[860,1148,871],{},[873,1150,1151],{},[857,1152,1153,1157,1161,1163],{},[878,1154,1155],{},[473,1156,632],{},[878,1158,1159],{},[473,1160,944],{},[878,1162,947],{},[878,1164,1165],{},"Additional classes to apply to the actions.",[638,1167,747],{"id":1168},"attachmentaction",[469,1170,1171,1172,1176,1177,704],{},"An action button. Renders a ",[523,1173,1174],{"href":55},[473,1175,54],{}," and accepts Vue fallthrough attributes such as ",[473,1178,773],{},[851,1180,1181,1193],{},[854,1182,1183],{},[857,1184,1185,1187,1189,1191],{},[860,1186,862],{},[860,1188,865],{},[860,1190,868],{},[860,1192,871],{},[873,1194,1195,1214,1233],{},[857,1196,1197,1201,1206,1211],{},[878,1198,1199],{},[473,1200,979],{},[878,1202,1203],{},[473,1204,1205],{},"ButtonVariants[\"variant\"]",[878,1207,1208],{},[473,1209,1210],{},"\"ghost\"",[878,1212,1213],{},"The button variant.",[857,1215,1216,1220,1225,1230],{},[878,1217,1218],{},[473,1219,693],{},[878,1221,1222],{},[473,1223,1224],{},"ButtonVariants[\"size\"]",[878,1226,1227],{},[473,1228,1229],{},"\"icon-xs\"",[878,1231,1232],{},"The button size.",[857,1234,1235,1239,1243,1245],{},[878,1236,1237],{},[473,1238,632],{},[878,1240,1241],{},[473,1242,944],{},[878,1244,947],{},[878,1246,1247],{},"Additional classes to apply to the action.",[638,1249,619],{"id":1250},"attachmenttrigger",[469,1252,1253,1254,1256,1257,704],{},"A full-card overlay that activates the attachment. Renders a ",[473,1255,756],{}," by default and accepts Vue fallthrough attributes such as ",[473,1258,773],{},[851,1260,1261,1273],{},[854,1262,1263],{},[857,1264,1265,1267,1269,1271],{},[860,1266,862],{},[860,1268,865],{},[860,1270,868],{},[860,1272,871],{},[873,1274,1275,1295,1314],{},[857,1276,1277,1282,1287,1292],{},[878,1278,1279],{},[473,1280,1281],{},"as",[878,1283,1284],{},[473,1285,1286],{},"PrimitiveProps[\"as\"]",[878,1288,1289],{},[473,1290,1291],{},"\"button\"",[878,1293,1294],{},"Element or component to render.",[857,1296,1297,1301,1306,1311],{},[878,1298,1299],{},[473,1300,760],{},[878,1302,1303],{},[473,1304,1305],{},"boolean",[878,1307,1308],{},[473,1309,1310],{},"false",[878,1312,1313],{},"Render as the child element, such as a link.",[857,1315,1316,1320,1324,1326],{},[878,1317,1318],{},[473,1319,632],{},[878,1321,1322],{},[473,1323,944],{},[878,1325,947],{},[878,1327,1328],{},"Additional classes to apply to the trigger.",[638,1330,568],{"id":1331},"attachmentgroup",[469,1333,1334],{},"Lays out attachments in a horizontally scrollable, snapping row.",[851,1336,1337,1349],{},[854,1338,1339],{},[857,1340,1341,1343,1345,1347],{},[860,1342,862],{},[860,1344,865],{},[860,1346,868],{},[860,1348,871],{},[873,1350,1351],{},[857,1352,1353,1357,1361,1363],{},[878,1354,1355],{},[473,1356,632],{},[878,1358,1359],{},[473,1360,944],{},[878,1362,947],{},[878,1364,1365],{},"Additional classes to apply to the group.",{"title":508,"searchDepth":1367,"depth":1367,"links":1368},2,[1369,1370,1371,1372,1373,1381,1387],{"id":479,"depth":1367,"text":295},{"id":537,"depth":1367,"text":538},{"id":550,"depth":1367,"text":551},{"id":578,"depth":1367,"text":579},{"id":636,"depth":1367,"text":358,"children":1374},[1375,1377,1378,1379,1380],{"id":640,"depth":1376,"text":641},3,{"id":665,"depth":1376,"text":666},{"id":687,"depth":1376,"text":688},{"id":293,"depth":1376,"text":710},{"id":722,"depth":1376,"text":723},{"id":741,"depth":1367,"text":742,"children":1382},[1383,1384,1385,1386],{"id":764,"depth":1376,"text":765},{"id":783,"depth":1376,"text":784},{"id":810,"depth":1376,"text":811},{"id":829,"depth":1376,"text":830},{"id":842,"depth":1367,"text":843,"children":1388},[1389,1390,1391,1392,1393,1394,1395,1396,1397],{"id":846,"depth":1376,"text":33},{"id":953,"depth":1376,"text":589},{"id":1012,"depth":1376,"text":1013},{"id":1050,"depth":1376,"text":1051},{"id":1093,"depth":1376,"text":838},{"id":1130,"depth":1376,"text":1131},{"id":1168,"depth":1376,"text":747},{"id":1250,"depth":1376,"text":619},{"id":1331,"depth":1376,"text":568},"Displays a file or image attachment with media, metadata, upload state, and actions.","md",null,{"component":36},"---\ntitle: Attachment\ndescription: Displays a file or image attachment with media, metadata, upload state, and actions.\ncomponent: true\nnew: true\n---\n\n::component-preview\n---\nname: AttachmentDemo\n---\n::\n\nThe `Attachment` component displays a file or image attachment, its media, name, and metadata, with optional actions and upload state. Use it for files and images in chat composers, message threads, and upload lists.\n\n\n## Installation\n\n::code-tabs\n\n::tabs-list\n\n  ::tabs-trigger{value=\"cli\"}\n  CLI\n  ::\n\n  ::tabs-trigger{value=\"manual\"}\n  Manual\n  ::\n\n::\n\n::tabs-content{value=\"cli\"}\n\n```bash\nnpx shadcn-vue@latest add attachment\n```\n\n::\n\n::tabs-content{value=\"manual\"}\n  ::steps\n    ::step\n    Copy and paste the [GitHub source code](https://github.com/unovue/shadcn-vue/tree/dev/apps/v4/registry/bases/reka/ui/attachment) into your project.\n    ::\n\n    ::step\n    Update the import paths to match your project setup.\n    ::\n  ::\n::\n\n::\n\n\n## Usage\n\n```vue showLineNumbers\n\u003Cscript setup lang=\"ts\">\nimport { FileTextIcon, XIcon } from '@lucide/vue'\nimport {\n  Attachment,\n  AttachmentAction,\n  AttachmentActions,\n  AttachmentContent,\n  AttachmentDescription,\n  AttachmentMedia,\n  AttachmentTitle,\n} from '@/components/ui/attachment'\n\u003C/script>\n\n\u003Ctemplate>\n  \u003CAttachment>\n    \u003CAttachmentMedia>\n      \u003CFileTextIcon />\n    \u003C/AttachmentMedia>\n    \u003CAttachmentContent>\n      \u003CAttachmentTitle>sales-dashboard.pdf\u003C/AttachmentTitle>\n      \u003CAttachmentDescription>PDF · 2.4 MB\u003C/AttachmentDescription>\n    \u003C/AttachmentContent>\n    \u003CAttachmentActions>\n      \u003CAttachmentAction aria-label=\"Remove sales-dashboard.pdf\">\n        \u003CXIcon />\n      \u003C/AttachmentAction>\n    \u003C/AttachmentActions>\n  \u003C/Attachment>\n\u003C/template>\n```\n\n## Composition\n\nUse the following composition to build an attachment:\n\n```text\nAttachment\n├── AttachmentMedia\n├── AttachmentContent\n│   ├── AttachmentTitle\n│   └── AttachmentDescription\n├── AttachmentActions\n│   └── AttachmentAction\n└── AttachmentTrigger\n```\n\nUse `AttachmentGroup` to lay out multiple attachments in a scrollable row:\n\n```text\nAttachmentGroup\n├── Attachment\n└── Attachment\n```\n\n## Features\n\n- Icon and image media through `AttachmentMedia`\n- Upload states: `idle`, `uploading`, `processing`, `error`, and `done` with built-in styling and a shimmer while in progress\n- Three sizes and horizontal or vertical orientation\n- A full-card `AttachmentTrigger` that opens a link or dialog while the actions stay independently clickable\n- Scrollable, snapping `AttachmentGroup` with an edge fade\n- Customizable styling through the Vue `class` attribute on every part\n\n## Examples\n\n### Image\n\nSet `variant=\"image\"` on `AttachmentMedia` and render an `\u003Cimg>` inside it. Use `orientation=\"vertical\"` to stack the media above the content.\n\n::component-preview\n---\nname: AttachmentImageDemo\n---\n::\n\n### States\n\nSet `state` to reflect the upload lifecycle. `uploading` and `processing` shimmer the title, and `error` switches to a destructive treatment.\n\n::component-preview\n---\nname: AttachmentStatesDemo\n---\n::\n\n### Sizes\n\nUse `size` to switch between `default`, `sm`, and `xs`.\n\n::component-preview\n---\nname: AttachmentSizesDemo\n---\n::\n\n### Group\n\nWrap attachments in `AttachmentGroup` to lay them out in a horizontally scrollable, snapping row with an edge fade.\n\n\n::component-preview\n---\nname: AttachmentGroupDemo\n---\n::\n\n### Trigger\n\nAdd an `AttachmentTrigger` to make the whole card open a link or dialog. It fills the card behind the actions, so the actions stay clickable.\n\n::component-preview\n---\nname: AttachmentTriggerDemo\n---\n::\n\n```vue showLineNumbers\n\u003Ctemplate>\n  \u003CDialog>\n    \u003CAttachment>\n      \u003C!-- media, content, actions -->\n      \u003CDialogTrigger as-child>\n        \u003CAttachmentTrigger aria-label=\"Preview research-summary.pdf\" />\n      \u003C/DialogTrigger>\n    \u003C/Attachment>\n    \u003CDialogContent>\n      \u003C!-- ... -->\n    \u003C/DialogContent>\n  \u003C/Dialog>\n\u003C/template>\n```\n\n## Accessibility\n\n`AttachmentAction` renders a `Button`, and `AttachmentTrigger` renders a real `\u003Cbutton>` (or your element via `as-child`). Follow the guidance below so both are operable and announced.\n\n### Label icon-only actions\n\n`AttachmentAction` is usually icon-only, so give each one an `aria-label` describing the action and its target.\n\n```vue showLineNumbers\n\u003Ctemplate>\n  \u003CAttachmentAction aria-label=\"Remove sales-dashboard.pdf\">\n    \u003CXIcon />\n  \u003C/AttachmentAction>\n\u003C/template>\n```\n\n### Label the trigger\n\n`AttachmentTrigger` covers the card with no text of its own, so give it an `aria-label` for what activating it does.\n\n```vue showLineNumbers\n\u003Ctemplate>\n  \u003CAttachmentTrigger as-child>\n    \u003Ca\n      :href=\"url\"\n      target=\"_blank\"\n      rel=\"noreferrer\"\n      aria-label=\"Open workspace.png\"\n    />\n  \u003C/AttachmentTrigger>\n\u003C/template>\n```\n\nThe trigger sits behind the actions in the stacking order, so an `AttachmentAction` and the `AttachmentTrigger` never trap each other — both remain separately focusable and clickable.\n\n### Keyboard scrolling\n\nAn `AttachmentGroup` scrolls horizontally. When its attachments are interactive: a trigger or actions, keyboard users reach off-screen items by tabbing to them. For a row of presentational attachments, make the group itself focusable and scrollable by adding `tabindex=\"0\"`, `role=\"group\"`, and an `aria-label`.\n\n### Meaning beyond color\n\nThe `error` state uses a destructive color. Keep the failure reason in `AttachmentDescription` so the state is not conveyed by color alone.\n\n## API Reference\n\n### Attachment\n\nThe root attachment container.\n\n| Prop          | Type                                                         | Default        | Description                                       |\n| ------------- | ------------------------------------------------------------ | -------------- | ------------------------------------------------- |\n| `state`       | `\"idle\" \\| \"uploading\" \\| \"processing\" \\| \"error\" \\| \"done\"` | `\"done\"`       | The upload state. Drives styling and the shimmer. |\n| `size`        | `\"default\" \\| \"sm\" \\| \"xs\"`                                  | `\"default\"`    | The attachment size.                              |\n| `orientation` | `\"horizontal\" \\| \"vertical\"`                                 | `\"horizontal\"` | Lay the media beside or above the content.        |\n| `class`       | `HTMLAttributes[\"class\"]`                                    | -              | Additional classes to apply to the root element.  |\n\n### AttachmentMedia\n\nThe media slot for an icon or image preview.\n\n| Prop        | Type                | Default  | Description                                    |\n| ----------- | ------------------- | -------- | ---------------------------------------------- |\n| `variant`   | `\"icon\" \\| \"image\"` | `\"icon\"` | Whether the media holds an icon or an `\u003Cimg>`. |\n| `class`   | `HTMLAttributes[\"class\"]` | -        | Additional classes to apply to the media slot. |\n\n### AttachmentContent\n\nWraps the title and description.\n\n| Prop        | Type     | Default | Description                                      |\n| ----------- | -------- | ------- | ------------------------------------------------ |\n| `class` | `HTMLAttributes[\"class\"]` | -       | Additional classes to apply to the content slot. |\n\n### AttachmentTitle\n\nThe attachment name. Shimmers while the attachment is `uploading` or `processing`.\n\n| Prop        | Type     | Default | Description                               |\n| ----------- | -------- | ------- | ----------------------------------------- |\n| `class` | `HTMLAttributes[\"class\"]` | -       | Additional classes to apply to the title. |\n\n### AttachmentDescription\n\nSecondary metadata such as the file type, size, or upload status.\n\n| Prop        | Type     | Default | Description                                     |\n| ----------- | -------- | ------- | ----------------------------------------------- |\n| `class` | `HTMLAttributes[\"class\"]` | -       | Additional classes to apply to the description. |\n\n### AttachmentActions\n\nA container for one or more actions, aligned to the end of the attachment.\n\n| Prop        | Type     | Default | Description                                 |\n| ----------- | -------- | ------- | ------------------------------------------- |\n| `class` | `HTMLAttributes[\"class\"]` | -       | Additional classes to apply to the actions. |\n\n### AttachmentAction\n\nAn action button. Renders a [`Button`](/docs/components/button) and accepts Vue fallthrough attributes such as `aria-label`.\n\n| Prop       | Type                       | Default     | Description                                  |\n| ---------- | -------------------------- | ----------- | -------------------------------------------- |\n| `variant`  | `ButtonVariants[\"variant\"]` | `\"ghost\"`   | The button variant.                          |\n| `size`     | `ButtonVariants[\"size\"]`   | `\"icon-xs\"` | The button size.                             |\n| `class`    | `HTMLAttributes[\"class\"]`  | -           | Additional classes to apply to the action.   |\n\n### AttachmentTrigger\n\nA full-card overlay that activates the attachment. Renders a `\u003Cbutton>` by default and accepts Vue fallthrough attributes such as `aria-label`.\n\n| Prop       | Type                             | Default | Description                                  |\n| ---------- | -------------------------------- | ------- | -------------------------------------------- |\n| `as`       | `PrimitiveProps[\"as\"]`           | `\"button\"` | Element or component to render.           |\n| `as-child` | `boolean`                        | `false` | Render as the child element, such as a link. |\n| `class`    | `HTMLAttributes[\"class\"]`        | -       | Additional classes to apply to the trigger.  |\n\n### AttachmentGroup\n\nLays out attachments in a horizontally scrollable, snapping row.\n\n| Prop        | Type     | Default | Description                               |\n| ----------- | -------- | ------- | ----------------------------------------- |\n| `class` | `HTMLAttributes[\"class\"]` | -       | Additional classes to apply to the group. |\n",{"title":33,"description":1398},"fw0Z7-6rXlLYlXCXXev13U9ffiufC42rUMZOItPPpCA",[1406,1407],{"title":29,"path":30,"stem":31,"children":-1},{"title":38,"path":39,"stem":40,"children":-1},1783698896739]