Title: AlignmentMatrixControl
Published: March 9, 2021
Last modified: October 14, 2026

---

# AlignmentMatrixControl

## In this article

 * [Props](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#props)
    - [defaultValue](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#defaultvalue)
    - [label](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#label)
    - [onChange](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#onchange)
    - [value](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#value)
    - [width](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#width)
 * [Subcomponents](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#subcomponents)
    - [AlignmentMatrixControl.Icon](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#alignmentmatrixcontrol-icon)

See the [WordPress Storybook](https://wordpress.github.io/gutenberg/?path=/docs/components-alignmentmatrixcontrol--docs)
for more detailed, interactive documentation.

AlignmentMatrixControl components enable adjustments to horizontal and vertical 
alignments for UI.

    ```language-jsx
    import { AlignmentMatrixControl } from '@wordpress/components';
    import { useState } from '@wordpress/element';

    const Example = () => {
        const [ alignment, setAlignment ] = useState( 'center center' );

        return (
            <AlignmentMatrixControl
                value={ alignment }
                onChange={ setAlignment }
            />
        );
    };
    ```

## 󠀁[Props](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#props)󠁿

### 󠀁[defaultValue](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#defaultvalue)󠁿

 * Type: `"center" | "top left" | "top center" | "top right" | "center left" | "
   center center" | "center right" | "bottom left" | "bottom center" | "bottom right"`
 * Required: No
 * Default: `'center center'`

If provided, sets the default alignment value.

### 󠀁[label](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#label)󠁿

 * Type: `string`
 * Required: No
 * Default: `'Alignment Matrix Control'`

Accessible label. If provided, sets the `aria-label` attribute of the
 underlying`
grid` widget.

### 󠀁[onChange](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#onchange)󠁿

 * Type: `((newValue: AlignmentMatrixControlValue) => void)`
 * Required: No

A function that receives the updated alignment value.

### 󠀁[value](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#value)󠁿

 * Type: `"center" | "top left" | "top center" | "top right" | "center left" | "
   center center" | "center right" | "bottom left" | "bottom center" | "bottom right"`
 * Required: No

The current alignment value.

### 󠀁[width](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#width)󠁿

 * Type: `number`
 * Required: No
 * Default: `92`

If provided, sets the width of the control.

## 󠀁[Subcomponents](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#subcomponents)󠁿

### 󠀁[AlignmentMatrixControl.Icon](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#alignmentmatrixcontrol-icon)󠁿

#### 󠀁[Props](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#props-2)󠁿

##### 󠀁[disablePointerEvents](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#disablepointerevents)󠁿

 * Type: `boolean`
 * Required: No
 * Default: `true`

If `true`, disables pointer events on the icon.

##### 󠀁[value](https://developer.wordpress.org/block-editor/reference-guides/components/alignment-matrix-control/?output_format=md#value-2)󠁿

 * Type: `"center" | "top left" | "top center" | "top right" | "center left" | "
   center center" | "center right" | "bottom left" | "bottom center" | "bottom right"`
 * Required: No
 * Default: `center`

The current alignment value.

First published

March 9, 2021

Last updated

October 14, 2026

Edit article

[ Improve it on GitHub: AlignmentMatrixControl ](https://github.com/WordPress/gutenberg/edit/trunk/packages/components/src/alignment-matrix-control/README.md)

[  Previous: Navigation](https://developer.wordpress.org/block-editor/reference-guides/components/navigation/)

[  Next: AnglePickerControl](https://developer.wordpress.org/block-editor/reference-guides/components/angle-picker-control/)