> ## 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.

# Config types

export const PublisherBadge = ({size = "md"}) => {
  return <Tooltip tip="Members with the publisher role can execute this action." cta="Workspace roles" href="/admin/users/access-control">
            <Badge icon="git-merge" color="green" size={size}>publisher</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 EditableBadge = ({size = "sm"}) => {
  return <Tooltip tip="Property can be directly modified">
            <Badge icon="pencil" color="blue" size={size}>editable</Badge>
        </Tooltip>;
};

export const ImmutableBadge = ({size = "sm"}) => {
  return <Tooltip tip="Property cannot be modified">
            <Badge icon="lock" color="gray" size={size}>immutable</Badge>
        </Tooltip>;
};

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

A **config type** is a named grouping of [config schemas](/cfg-mgmt/primitives/schemas/overview) and their [config instances](/cfg-mgmt/primitives/config-instances).

Every config instance and config schema belongs to exactly one config type. Config types gives the configurations in your fleet records a stable, human-readable identity (`Mobility`, `Perception`) that survives across the schemas and instances that come and go beneath it.

For example, a `Mobility` config type houses configs related to the robot's motion while a `Perception` config type houses configs related to the robot's perception. Each config type has its own versioned schema, which its config instances must adhere to depending on the release they are deployed under.

## Properties

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

  A human-readable display name that can contain most characters, such as spaces, special characters, and punctuation. Must contain between 1 and 48 characters.

  Examples: `Mobility`, `Safety Features`, `Perception`
</ParamField>

<ParamField path="slug" type="string">
  <ImmutableBadge />

  A unique, code-friendly identifier for a config type.

  Slugs are immutable and must satisfy the following constraints:

  * Contain only lowercase letters, digits, and hyphens (`-`)
  * Start and end with a lowercase letter or digit
  * Contain between 1 and 48 characters

  Slugs are primarily used in code to reference config types in a human-readable format. For instance, config schemas are annotated with a config type slug to associate them with their proper config type.

  Examples: `mobility`, `safety-features`, `perception`
</ParamField>

## Create a config type  <PublisherBadge />

Navigate to the [Config Types page](https://app.mirurobotics.com/configs) and click **New Config Type** in the top right corner.

<Frame>
  ![Create Config Type Page](https://assets.mirurobotics.com/docs/v04/images/config-types/create-page.png)
</Frame>

Fill in the fields, then click **Create**.

<Frame>
  ![Create Config Type Dialog](https://assets.mirurobotics.com/docs/v04/images/config-types/create-dialog.png)
</Frame>

<Warning>
  Config type slugs are immutable and cannot be modified after creation.
</Warning>

## Edit a config type  <PublisherBadge />

Navigate to the [Config Types page](https://app.mirurobotics.com/configs), click the ellipses (...) on the config type you want to edit, and hit **Edit**.

<Frame>
  ![Config Type Ellipses Dropdown](https://assets.mirurobotics.com/docs/v04/images/config-types/ellipses-dropdown.png)
</Frame>

Update the desired fields, then click **Save**.

<Frame>
  ![Edit Config Type Dialog](https://assets.mirurobotics.com/docs/v04/images/config-types/edit-dialog.png)
</Frame>

## Delete a config type  <AdminBadge />

Deleting a config type is irreversible. Once a config type is deleted, it cannot be recovered.

Deleting a config type is only possible if there are no config instances for that config type. As such, most config types cannot be deleted. If no config instances exist for the config type, deleting a config type removes all associated schemas.

To delete a config type, click the ellipses of the config type you want to delete and select **Delete**.

<Frame>
  ![Config Type Ellipses Dropdown](https://assets.mirurobotics.com/docs/v04/images/config-types/ellipses-dropdown.png)
</Frame>

A confirmation dialog will appear. Hit **Delete** to confirm the deletion.

<Frame>
  ![Delete Config Type Dialog](https://assets.mirurobotics.com/docs/v04/images/config-types/delete-dialog.png)
</Frame>
