---
title: "line"
description: "Copies in a row, marching away from the layer inside in one direction."
group: "effects"
groupTitle: "Filters & effects"
categoryId: "effects.instances"
categorySlug: "effects-instances"
categoryTitle: "Instances"
kind: "function"
sourceUrl: "https://github.com/shader-effects-inc/shaders/blob/main/packages/core/src/std/effects/instances.ts#L103"
---

# line

Copies in a row, marching away from the layer inside in one direction.

```ts
line(slots: LineSlots): PlacementSpec
```

Import `effects` from `shaders/std` and use `effects.instances.line`.

## Parameters

| Name | Type | Notes |
|---|---|---|
| `slots` | `LineSlots` |  |

## Example

```ts
placement: line({count: p('count'), direction: p('direction'), spacing: p('spacing')})
```

## See also

- [`grid`](/docs/primitives/effects-instances/grid) — Copies in rows and columns, filling this layer's bounding box.
- [`radial`](/docs/primitives/effects-instances/radial) — Copies around a circle centred on the layer inside.
- [`byMode`](/docs/primitives/effects-instances/bymode) — Lets one select prop switch between a grid, a radial and a linear layout.

## Used by

[Repeater](/docs/components/repeater)