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

# Workspace

export const LEFT_TOOLTIP = {
  tip: "The member left the workspace; they cannot login to the workspace or access any resources",
  cta: "Learn more",
  href: "/admin/users/overview#status"
};

export const OwnerBadge = ({size = "md"}) => {
  return <Tooltip tip="You must be the owner to execute this action." cta="Workspace roles" href="/admin/users/access-control">
            <Badge icon="crown" color="yellow" size={size}>owner</Badge>
        </Tooltip>;
};

export const AdminBadge = ({size = "md"}) => {
  return <Tooltip tip="Workspace owners and administrators can execute this action." cta="Workspace roles" href="/admin/users/access-control">
            <Badge icon="shield-check" color="blue" size={size}>admin</Badge>
        </Tooltip>;
};

export const Framed = ({image, background, link, alt = "Framed content", borderWidth = "24px", outerRadius = "10px", innerRadius = "6px"}) => {
  const parseShorthand = value => {
    const values = String(value).trim().split(/\s+/);
    switch (values.length) {
      case 1:
        return [values[0], values[0], values[0], values[0]];
      case 2:
        return [values[0], values[1], values[0], values[1]];
      case 3:
        return [values[0], values[1], values[2], values[1]];
      default:
        return values.slice(0, 4);
    }
  };
  const isZero = v => parseFloat(v) === 0;
  const padding = parseShorthand(borderWidth);
  const outer = parseShorthand(outerRadius);
  const cornerMasks = [];
  if (isZero(padding[0]) && isZero(padding[3])) {
    cornerMasks.push(`radial-gradient(circle at 0% 0%, transparent ${outer[0]}, black ${outer[0]})`);
  }
  if (isZero(padding[0]) && isZero(padding[1])) {
    cornerMasks.push(`radial-gradient(circle at 100% 0%, transparent ${outer[1]}, black ${outer[1]})`);
  }
  if (isZero(padding[2]) && isZero(padding[1])) {
    cornerMasks.push(`radial-gradient(circle at 100% 100%, transparent ${outer[2]}, black ${outer[2]})`);
  }
  if (isZero(padding[2]) && isZero(padding[3])) {
    cornerMasks.push(`radial-gradient(circle at 0% 100%, transparent ${outer[3]}, black ${outer[3]})`);
  }
  const backgroundMask = cornerMasks.length > 0 ? cornerMasks.join(", ") : undefined;
  const innerImage = <img src={image} alt={alt} noZoom={link ? true : false} style={{
    display: "block",
    width: "100%",
    margin: 0,
    borderRadius: 0
  }} />;
  return <div style={{
    display: "inline-block",
    position: "relative",
    borderRadius: outerRadius,
    overflow: "hidden"
  }}>
            {}
            {background && <div style={{
    position: "absolute",
    inset: 0,
    backgroundImage: `url(${background})`,
    backgroundSize: "cover",
    maskImage: backgroundMask,
    WebkitMaskImage: backgroundMask,
    maskComposite: "intersect",
    WebkitMaskComposite: "source-in"
  }} />}
            {}
            <div style={{
    position: "relative",
    padding: borderWidth
  }}>
                <div style={{
    borderRadius: innerRadius,
    overflow: "hidden",
    lineHeight: 0
  }}>
                    {link ? <a href={link}>{innerImage}</a> : innerImage}
                </div>
            </div>
        </div>;
};

export const MutableBadge = ({size = "sm"}) => {
  return <Tooltip tip="Property is automatically updated by the system; cannot be modified directly">
            <Badge icon="feather" color="orange" size={size}>mutable</Badge>
        </Tooltip>;
};

<Framed background="https://assets.mirurobotics.com/docs/v04/images/workspaces/background.jpeg" image="https://assets.mirurobotics.com/docs/v04/images/workspaces/header:page.png" borderWidth="24px 0 0 48px" innerRadius="8px 0 0 0" />

Workspaces are the highest-level organizational unit in Miru. They contain all sub-resources, such as devices, releases, deployments, config instances, etc.

Users can belong to only one workspace. As such, you cannot log in to multiple workspaces with the same email address.

## Properties

<ParamField path="name" type="string">
  <MutableBadge />

  The name of the workspace. Must contain between 1 and 48 characters.

  Examples: `Miru`
</ParamField>

<ParamField path="logo" type="image">
  <MutableBadge />

  The logo of the workspace.
</ParamField>

## Name  <AdminBadge />

To update your workspace's name, navigate to the [workspace](https://app.mirurobotics.com/settings/workspace) page.

Edit the **Name** field and hit **Enter** on your keyboard.

<Frame>
  ![Workspace Name Field](https://assets.mirurobotics.com/docs/v04/images/workspaces/name-field.png)
</Frame>

## Logo  <AdminBadge />

To set your workspace logo, navigate to the [workspace](https://app.mirurobotics.com/settings/workspace) page.

Click the current logo and select the image you want to use from the file system.

<Frame>
  ![Workspace Logo Field](https://assets.mirurobotics.com/docs/v04/images/workspaces/logo-field.png)
</Frame>

A dialog will appear, allowing you to crop the image.

<Frame>
  ![Workspace Crop Logo Dialog](https://assets.mirurobotics.com/docs/v04/images/workspaces/crop-logo-dialog.png)
</Frame>

Crop the image to your desired size, then click **Save** to set your workspace logo.

## Transfer ownership  <OwnerBadge />

To transfer ownership of your workspace to another member, navigate to the [members](https://app.mirurobotics.com/settings/members) page. Click the ellipses (...) of the member you want to transfer ownership to and hit **Transfer ownership**.

<Frame>
  ![Workspace Transfer Ownership Dropdown](https://assets.mirurobotics.com/docs/v04/images/users/members/dropdown.png)
</Frame>

<Warning>
  Transferring workspace ownership is a sensitive operation and cannot be undone. Please proceed with caution.
</Warning>

## Leave your workspace

Leaving a workspace removes all access to your workspace and sets your status to <Tooltip tip={LEFT_TOOLTIP.tip} cta={LEFT_TOOLTIP.cta} href={LEFT_TOOLTIP.href}>left</Tooltip>:

* You are immediately logged out
* You cannot login to this workspace or access any resources (signing in with the same email address creates a new workspace with a new account)

Leaving a workspace is reversible if you are *not the only active member*. An admin can invite you back to the workspace at any time.

However, if you are *the only* active member of a workspace, leaving the workspace will delete the workspace and all associated resources.

To leave your workspace, navigate to the [Profile page](https://app.mirurobotics.com/settings/profile) and click **Leave workspace**.

<Frame>
  ![Workspace Access](https://assets.mirurobotics.com/docs/v04/images/users/profile/workspace-access.png)
</Frame>

If the **leave workspace** button is disabled, you are not the only member of the workspace and must first [transfer ownership](/admin/workspace#transfer-ownership) to another member.
