useBorder
Commons
stable
Resolves the `border` prop (boolean, width keyword, direction string or number) into utility classes and inline border declarations. Supports standalone borderColor and borderStyle props.
API
Signature
Full TypeScript signature sourced from the composable file.
Consumed interfaces
IBorderProps
API
Parameters
Input parameters accepted by this composable.
- propsrequiredIBorderProps | Ref<boolean | number | string | TDirectionBoth | Array<TDirectionBoth> | null | undefined>
- Either the component props object (reads border, borderColor, borderStyle) or a plain Ref for the border shorthand only.
- namestringgetCurrentInstanceName()
- Component name prefix for the `{name}--border` class.
API
Return values
Properties and methods exposed by the composable return object.
- borderClasses
- Classes including `{name}--border`, optional direction suffix, and utility classes (origam--border-thin/thick/none).
- borderStyles
- Inline border declarations for numeric widths and free-form string shorthand. Also includes standalone borderColor and borderStyle when set.
Usage
Examples
Ready-to-paste usage snippets.
Common border patterns