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

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 ImmutableBadge = ({size = "sm"}) => {
  return <Tooltip tip="Property cannot be modified">
            <Badge icon="lock" color="gray" size={size}>immutable</Badge>
        </Tooltip>;
};

<Framed background="https://assets.mirurobotics.com/docs/v04/images/config-instances/background.jpeg" image="https://assets.mirurobotics.com/docs/v04/images/config-instances/header:panel.png" borderWidth="28px 56px 0 0" innerRadius="0 8px 0 0" />

A **config instance**, also known as a **config** or an **instance**, is a set of parameters used to modify the behavior of code. Config instances are stored as text files (JSON or YAML), which applications parse into a structured format for consumption.

## Properties

<ParamField path="content" type="object">
  <ImmutableBadge />

  The configuration values that are deployed to the device as a JSON or YAML file.
</ParamField>

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

  The absolute file system path where the config instance is written on the device.

  Examples: `/srv/miru/configs/v1/motion-control.json`, `/srv/miru/configs/safety.yaml`
</ParamField>

<ParamField path="config schema" type="Config Schema">
  <ImmutableBadge />

  The [config schema](/cfg-mgmt/primitives/schemas/overview#properties) that the config instance must adhere to.

  Example: `SCH-FmoDN`
</ParamField>

## File formats

Currently, config instances support JSON and YAML. However, support for more formats, including XML, is coming soon!

Config instances support JSON and YAML. The Miru Agent parses both formats at deploy time and exposes the resulting data to on-device applications in the same way, so you can pick whichever format fits your workflow.

<Note>
  YAML support requires Miru Agent **v0.7.0** or newer
</Note>
