Attachment API
Every prop of the 9 parts Attachment exports, plus each of the 2 symbols it exports alongside them, generated from the package manifest.
import { Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger } from '@oceanic-hub/brand-system'- Layer
- core — shadcn-derived primitives.
- Exports
- Attachment · AttachmentAction · AttachmentActions · AttachmentContent · AttachmentDescription · AttachmentGroup · AttachmentMedia · AttachmentTitle · AttachmentTriggeralso: attachmentMediaVariants · attachmentVariantstypes: AttachmentMediaProps · AttachmentProps · AttachmentState · AttachmentTriggerProps
- Variants
- size: default | sm | xs
- orientation: horizontal | vertical
- state: done | error | idle | processing | uploading
- variant: default | destructive | ghost | link | outline | secondary
- size: icon | icon-lg | icon-sm | lg | md | sm
- variant: icon | image
- Contract
- packages/brand-system/src/components/attachment.contract.test-d.ts
- Demos
- 7 on the Attachment page — rendered live, hydrated
- Source
- packages/brand-system/src/components/attachment.tsx
Generated from manifest/component-manifest.json, so it cannot drift from the source. For what Attachment is for, how it composes and what it looks like, see Attachment.
Attachment
AttachmentProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof attachmentVariants>.
AttachmentAction
React.ComponentPropsWithoutRef<typeof Button>
Prop
Type
Also accepts everything from React.ComponentPropsWithoutRef<typeof Button>.
AttachmentActions
A styled <div> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
AttachmentContent
A styled <div> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
AttachmentDescription
A styled <span> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
AttachmentGroup
A styled <div> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
AttachmentMedia
AttachmentMediaProps
Prop
Type
Also accepts everything from React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof attachmentMediaVariants>.
AttachmentTitle
A styled <span> with no API of its own. It takes that element's standard attributes — className, event handlers, ref — and nothing else.
AttachmentTrigger
AttachmentTriggerProps
Prop
Type
Also accepts everything from React.ButtonHTMLAttributes<HTMLButtonElement>.
attachmentMediaVariants
A cva class builder. It returns the class string for a set of variants, so a foreign element can wear this component's surface — a link styled as a button, an AlertDialogAction styled as a destructive one. An advanced move: reach for the component first.
(props?: ({ variant?: "icon" | "image" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined): stringParameters
Prop
Type
Variant axes
Read off the component's own cva config, so this table and the parts that consume it cannot disagree.
Prop
Type
attachmentVariants
A cva class builder. It returns the class string for a set of variants, so a foreign element can wear this component's surface — a link styled as a button, an AlertDialogAction styled as a destructive one. An advanced move: reach for the component first.
(props?: ({ size?: "default" | "sm" | "xs" | null | undefined; orientation?: "horizontal" | "vertical" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined): stringParameters
Prop
Type
Variant axes
Read off the component's own cva config, so this table and the parts that consume it cannot disagree.
Prop
Type