# Migrating from 0.x

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

Version 1.0 is a clean break. The components were rebuilt on the Ecosphere design system: new names, new props, a bundled stylesheet and fonts, and one blue-on-slate theme.

## Before and after

The same app setup in 0.x and in 1.0. Open the code to compare them.

Vue (vue-ecosphere):

```vue
// 0.x
app.use(Ecosphere);
app.config.globalProperties.$ecosphere.theming.setTheme("dark");

<v-eco-button label="Save" type="primary" />
<v-eco-input v-model="name" label="Name" />

// 1.0
import Ecosphere from "vue-ecosphere";
import "vue-ecosphere/styles.css";
app.use(Ecosphere);

<EcoButton variant="primary">Save</EcoButton>
<EcoTextField v-model="name" label="Name" />
```

React (react-ecosphere):

```tsx
// react-ecosphere has no 0.x: it starts at 1.1 with the same API as vue-ecosphere
import "react-ecosphere/styles.css";
import { EcoButton, EcoTextField } from "react-ecosphere";

<EcoButton variant="primary">Save</EcoButton>
<EcoTextField value={name} onChange={setName} label="Name" />
```

## Component map

Every 0.x component and what replaces it.

| 0.x | 1.0 | Notes |
| --- | --- | --- |
| `v-eco-button` | `EcoButton` | type → variant (primary \| secondary \| tertiary \| danger). size is md \| sm. |
| `v-eco-link` | `EcoLink` | Inline link, optional underline and trailing arrow. |
| `v-eco-input` | `EcoTextField` | v-model; label, required, hint and error props render the field wrapper. |
| `v-eco-textarea` | `EcoTextarea` | Three heights and an optional character counter. |
| `v-eco-checkbox` | `EcoCheckbox` | Native checkbox inside a label; indeterminate supported. |
| `v-eco-checkbox-group` | `EcoCheckboxGroup` | v-model is an array of values. |
| `v-eco-choice-chips` | `EcoChoicePills` | Many small values chosen at once. |
| `v-eco-dropdown` | `EcoSelect` | Listbox with keyboard navigation and type-ahead. |
| `v-eco-search-dropdown` | `EcoSelect / EcoSearchField` | Use EcoSearchField for search, EcoSelect for choosing. |
| `v-eco-radio, v-eco-radio-group` | `EcoSegmented or EcoSelect` | The system has no radio style: use Segmented for 2–5 short options, Select beyond that. |
| `v-eco-switch` | `EcoCheckbox` | Removed. Settings saved with a form are checkboxes; instant actions are buttons. |
| `v-eco-color-picker` | `—` | Removed: outside the system's scope. Use a native input type="color". |
| `v-eco-icon` | `EcoIcon` | Still RemixIcon, now bundled. name="add-line" (the ri- prefix is optional). |
| `v-eco-avatar` | `EcoAvatar` | Initials avatars in four sizes. |
| `v-eco-tag` | `EcoTag / EcoTags` | Status now lives in EcoBadge and EcoScore. |
| `v-eco-stepper` | `EcoProgressSteps` | Steps with done, current, upcoming and error states. |
| `v-eco-tab-navigation` | `EcoTabs` | v-model is the active key; counts and notification badges built in. |
| `v-eco-menu` | `EcoMenu` | Popover menu with keyboard support; v-model:open. |
| `v-eco-sidebar, v-eco-navbar` | `EcoAppShell + EcoNavItem` | One frame: sidebar, topbar and work area, with a collapsible rail. |
| `v-eco-breadcrumb` | `EcoPageHeader` | Removed. The page header's eyebrow carries the location. |

## Theming

The $ecosphere.theming helpers (setTheme, setColors) and the dark theme are gone: the system ships one theme. Every value is a CSS custom property, so override tokens in your own stylesheet.

Vue (vue-ecosphere):

```vue
/* Theming: override tokens after the stylesheet */
:root {
  --accent: #1d57a6;
  --accent-hover: #16468a;
  --app-canvas: #f6f7f9;
}
```

React (react-ecosphere):

```tsx
/* Theming: override tokens after the stylesheet */
:root {
  --accent: #1d57a6;
  --accent-hover: #16468a;
  --app-canvas: #f6f7f9;
}
```
