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

Signature TypeScript complète extraite du fichier du composable.

typescript

Interfaces consommées

IBorderProps

API

Paramètres

Paramètres d'entrée acceptés par ce composable.

props
requis
IBorderProps | 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.
name
string
getCurrentInstanceName()
Component name prefix for the `{name}--border` class.

API

Valeurs de retour

Propriétés et méthodes exposées par l'objet retourné par le composable.

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

Exemples

Extraits de code prêts à coller.

Common border patterns

vue