# Vehicle Card

> An electric car: charge in percent with the limit marked on the bar, range, charging state with power and when it is done, lock and climate as buttons, the inside temperature and where it is.

Component · Connectors · Halo kit · [Live page](https://ui.twentyfirst.media/halo/components/VehicleCard/)

An electric car: charge in percent with the limit marked on the bar, range, charging state with
power and when it is done, lock and climate as buttons, the inside temperature and where it is.

## Example

```tsx
import { VehicleCard } from "@twentyfirstmedia/halo";
import "./_connectors";

export default function Preview() {
  return (
    <div style={{ maxWidth: 420 }}>
      <VehicleCard
        name="Model Y"
        model="Long Range · 2024"
        battery={58}
        range={287}
        limit={80}
        charging="charging"
        power={11}
        until={new Date(2026, 10, 15, 6, 30)}
        locked
        climateOn={false}
        inside={9}
        location="Home · Garage"
        onLock={() => {}}
        onClimate={() => {}}
        service={{ name: "Tesla", icon: "brandTesla" }}
      />
    </div>
  );
}
```

## Props

### VehicleCard

| Prop | Type | Notes |
| --- | --- | --- |
| `name` | `string` | Required |
| `model?` | `string` |  |
| `battery` | `number` | Battery (or tank) in percent. |
| `range?` | `number` | Range in km. |
| `limit?` | `number` | The charge limit in percent, marked on the bar. |
| `charging?` | `"charging" \| "complete" \| "plugged" \| "unplugged"` |  |
| `power?` | `number` | Charging power in kW while charging. |
| `until?` | `Date \| string \| number` | When charging reaches the limit. |
| `locked?` | `boolean` |  |
| `inside?` | `number` | Inside temperature in °C. |
| `climateOn?` | `boolean` |  |
| `location?` | `ReactNode` |  |
| `onLock?` | `(locked: boolean) => void` |  |
| `onClimate?` | `(on: boolean) => void` |  |
| `service?` | `ServiceRef` |  |
| `className?` | `string` | Extra class on the root element. |
| `style?` | `CSSProperties` | Inline style on the root element. |
