> ## Documentation Index
> Fetch the complete documentation index at: https://rive.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Align and Distribute

> Align objects to the artboard or to each other.

export const VideoEmbed = ({src}) => {
  return <div style={{
    width: "100%",
    height: "100%",
    overflow: "hidden"
  }}>

      <video src={src} autoPlay loop muted playsInline style={{
    width: "100%",
    height: "100%",
    borderRadius: 0,
    margin: 0,
    display: "block",
    objectFit: "cover",
    backgroundColor: "transparent"
  }} />
    </div>;
};

export const YouTube = ({id, timestamp}) => {
  const videoSrc = timestamp ? `https://www.youtube.com/embed/${id}?start=${timestamp}` : `https://www.youtube.com/embed/${id}`;
  return <iframe width="100%" height="400" src={videoSrc} title="YouTube video player" frameBorder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerPolicy="strict-origin-when-cross-origin" allowFullScreen />;
};

<YouTube id="LBB3BDo5pR4" />

Use align and distribute tools to quickly position objects on the artboard or space multiple objects evenly.

When you select one or more objects, the align and distribute tools appear in the Inspector.

## Align

Align tools let you align objects to the left, right, top, bottom, or center.

When a single object is selected, the object aligns to the artboard. When multiple objects are selected, the selected objects align to each other.

<VideoEmbed src="https://static.rive.app/video/align-tools.mp4" />

## Distribute

Distribution tools appear when multiple objects are selected.

Use distribution to space selected objects evenly, either horizontally or vertically. This is useful when creating repeated elements, button groups, icon rows, or other layouts where objects should have consistent spacing.

<VideoEmbed src="https://static.rive.app/video/distribute-tools.mp4" />
