# Placeholder

Source: https://ecosphere.dev/docs/data/placeholder (Ecosphere 1.5). Install `vue-ecosphere` for Vue 3 or `react-ecosphere` for React 18.2+/19: same components, props, markup and stylesheet.

A hatch for space that is empty, and the captioned viewport a scanned page sits in.

`import { EcoPlaceholder } from "vue-ecosphere"`

## ph — at three sizes

A hatch reads as “nothing is here”; a grey box reads as “something is loading”. Use Skeleton for the second.

Vue (vue-ecosphere):

```vue
<div class="crow">
  <EcoPlaceholder width="30px" height="38px" radius="4px" />
  <EcoPlaceholder width="120px" height="80px" radius="var(--r-md)" />
  <EcoPlaceholder height="80px" radius="var(--r-md)" style="flex:1" />
</div>
```

React (react-ecosphere):

```tsx
<div className="crow">
  <EcoPlaceholder width="30px" height="38px" radius="4px" />
  <EcoPlaceholder width="120px" height="80px" radius="var(--r-md)" />
  <EcoPlaceholder height="80px" radius="var(--r-md)" style={{ flex: 1 }} />
</div>
```

## scan — a viewport with its caption plate

The caption sits on an ink plate so white text clears 4.5:1 over a photographed page.

Vue (vue-ecosphere):

```vue
<EcoPlaceholder caption="Scanned sheet · page 2 of 4 · question 3 and 4" />
```

React (react-ecosphere):

```tsx
<EcoPlaceholder caption="Scanned sheet · page 2 of 4 · question 3 and 4" />
```

## API

Vue (vue-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `width / height` | `string` | — | CSS size. Omit to let the layout size it. |
| `radius` | `string` | — | CSS border radius, e.g. var(--r-md). |
| `caption` | `string` | — | Render the scan viewport (300px minimum) with this caption plate. Name the page and question. |

React (react-ecosphere):

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| `width / height` | `string` | — | CSS size. Omit to let the layout size it. |
| `radius` | `string` | — | CSS border radius, e.g. var(--r-md). |
| `caption` | `string` | — | Render the scan viewport (300px minimum) with this caption plate. Name the page and question. |
