usePadding

Commons
stable

Resolves the `padding` shorthand prop into utility classes for spacing-scale steps (0–12) or inline padding declarations for custom values. Mirror of useMargin for the padding axis.

API

Signature

Full TypeScript signature sourced from the composable file.

typescript

Consumed interfaces

IPaddingProps

API

Parameters

Input parameters accepted by this composable.

props
required
IPaddingProps
Component props extending IPaddingProps. Reads the `padding` shorthand.
name
string
getCurrentInstanceName()
Component name prefix used for the `--padded` class.

API

Return values

Properties and methods exposed by the composable return object.

paddingClasses
Utility class names (e.g. ["origam--p-4"]) for scale steps.
paddingStyles
Inline CSS declarations for custom padding values.

Usage

Examples

Ready-to-paste usage snippets.

Card with scale padding

vue