IMarginProps

interface
Layout & Sizing

Margin spacing contract — all four sides plus logical block/inline shorthands. Values map to the DS spacing scale when a number or scale key is passed, or accept any CSS length string.

TypeScript

Definition

The TypeScript interface definition as found in the origam source. Click the copy icon to copy the snippet.

typescript

API

Properties

Every property declared by this interface, with its type, optionality and default.

margin
boolean | number | string
Shorthand margin applied to all four sides. A number maps to the DS spacing scale; a string is used verbatim; true applies the default spacing unit.
marginTop
boolean | number | string
Top margin. Accepts the same value shapes as `margin`.
marginLeft
boolean | number | string
Left margin (physical). Accepts the same value shapes as `margin`.
marginBottom
boolean | number | string
Bottom margin. Accepts the same value shapes as `margin`.
marginRight
boolean | number | string
Right margin (physical). Accepts the same value shapes as `margin`.
marginBlock
boolean | number | string
Logical block-axis shorthand (top + bottom in horizontal writing modes).
marginInline
boolean | number | string
Logical inline-axis shorthand (left + right in horizontal writing modes).
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string

Ecosystem

Used by

Components and composables that extend or consume this interface.

Usage

Examples

Ready-to-paste code snippets using this interface.

Consuming margin props via useMargin

typescript