---
title: "Line & Divider Image API — Rules and accents | Imejis"
description: "Thin filled bars as dividers, underlines and accents — thickness and rounding set per component, recolored on every API call. Start designing for free."
url: "https://www.imejis.io/components/line"
---

# Line & Divider Image API — Rules and accents | Imejis

A thin filled bar used as a divider or underline — a rectangle specialized for separators (rendered by the rect renderer).

## Use cases

- Section dividers in report and email images
- Heading underlines in brand colors
- Accent bars recolored per campaign or category

## Properties

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `fillColor` | `color` | `"#808080"` | Line color. |
| `opacity` | `number` | `1` | Overall component opacity from 0 (transparent) to 1 (opaque). |
| `borderWidth` | `number` | `0` | Border thickness in pixels around the component. |
| `borderColor` | `color` | `"transparent"` | Border color (any CSS color). |
| `borderStyle` | `'solid' \| 'dashed' \| 'dotted' \| 'double' \| 'none'` | `"solid"` | Border line style. |
| `borderRadius` | `number` | `0` | Corner radius in pixels. |
| `boxShadow` | `string` | — | CSS box-shadow applied to the component, e.g. "0 4px 6px rgba(0,0,0,0.1)". |

## Sample design JSON

```json
{
  "title": "Line sample",
  "description": "A dynamic divider line",
  "dimensions": {
    "width": 800,
    "height": 420
  },
  "background": {
    "color": "#ffffff"
  },
  "components": [
    {
      "id": "sample-line",
      "key": "divider",
      "type": "line",
      "position": {
        "x": 160,
        "y": 206
      },
      "rotation": 0,
      "size": {
        "width": 480,
        "height": 8
      },
      "dynamic": true,
      "properties": {
        "fillColor": "#111827",
        "borderRadius": 4,
        "opacity": 1
      }
    }
  ]
}
```

## Examples

### Newsletter section divider

An indigo rule separating an imagined newsletter header from the story list below it.

API overrides that reproduce this example:

```json
{
  "divider.fillColor": "#4F46E5"
}
```

### Divider on a dark report card

A muted slate rule splitting the title from the stats on a dark dashboard snapshot.

API overrides that reproduce this example:

```json
{
  "divider.fillColor": "#475569"
}
```

## API overrides

Recolor per render with '<key>.fillColor' (or just '<key>'); opacity and borderColor are overridable too.

Flat override payload (`key.property` addressing) with the sample design's current values — send only the keys you want to change:

```json
{
  "divider.fillColor": "#111827",
  "divider.borderRadius": 4,
  "divider.opacity": 1
}
```

```bash
curl --location 'https://render.imejis.io/v1/{{YOUR_DESIGN_ID}}' \
--header 'dma-api-key: {{YOUR_API_KEY}}' \
--header 'Content-Type: application/json' \
--data '{
    "divider.fillColor": "#111827",
    "divider.borderRadius": 4,
    "divider.opacity": 1
}'
```

`{{YOUR_DESIGN_ID}}` and `{{YOUR_API_KEY}}` are placeholders: first create
the design in your account (paste the sample design JSON above into the
editor at https://app.imejis.io, or create it programmatically via the
imejis MCP server's `create_design` + `update_design` tools), then render
it with the design's id and one of your API keys.

Agents: the MCP server at https://api.imejis.io/api/mcp exposes this same
catalog as structured data via the `list_component_types` tool (property
kinds, allowed values, bounds, ready-to-use sample designs).

## Frequently Asked Questions

### Can I recolor the line per API call?

Yes — '<key>.fillColor' (or just the key) changes the color per render; opacity and border properties are overridable too.

### How do I control the thickness?

The line is a thin rectangle, so its thickness is simply the component's height (or width when vertical) — 2px for a hairline, more for accents.

### How is line different from rectangle?

It renders through the same rect renderer — line is a purpose-named thin rectangle for separators, so everything a rectangle can do applies.

## Variants

- [Hairline](https://www.imejis.io/components/line/hairline.md) — A 2px rule — subtle section separators.
- [Accent bar](https://www.imejis.io/components/line/accent-bar.md) — A short thick bar — heading underlines and brand accents.

All components: https://www.imejis.io/components.md
