instructure-ui icon indicating copy to clipboard operation
instructure-ui copied to clipboard

[v12] InstUI-4399 add margin props

Open git-nandor opened this issue 2 months ago • 1 comments

INSTUI-4399

Summary

This PR adds a new margin prop to multiple components to provide consistent and customizable spacing control across the UI.

Components Updated: -FormFieldGroup -CheckboxGroup -RadioInputGroup -Checkbox -RadioInput -RangeInput -Text -ToggleButton

Test plan

On the doc page try to add margin prop for the components, it should accept spacing tokens (e.g. 'space16'), legacy values (e.g. 'large'), and custom CSS values (e.g. '10px').

<FormFieldGroup
  margin="2rem"
  description="Fruits"
  rowSpacing="large"
  messages={[
  { text: 'Complete All Fields', type: 'error' }
  ]}
>
  <RadioInputGroup
    margin="20px"
    name="fruit3"
    defaultValue="banana"
    description={
      <ScreenReaderContent>Select a fruit</ScreenReaderContent>
    }
  >
    <RadioInput margin="small" label="Apple" value="apple" />
    <RadioInput margin="20px" label="Orange" value="orange" />
    <RadioInput margin="space24" label="Banana" value="banana" />
  </RadioInputGroup>

</FormFieldGroup>

git-nandor avatar Oct 21 '25 13:10 git-nandor

PR Preview Action v1.6.2 :---: |

:rocket: View preview at
https://instructure.design/pr-preview/pr-2212/

|
Built to branch gh-pages at 2025-11-03 16:32 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

github-actions[bot] avatar Oct 21 '25 13:10 github-actions[bot]