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.
Consumed interfaces
IPaddingProps
API
Parameters
Input parameters accepted by this composable.
- propsrequiredIPaddingProps
- Component props extending IPaddingProps. Reads the `padding` shorthand.
- namestringgetCurrentInstanceName()
- 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