Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Wind Farm Map Block for Vue

Twelve turbines on a drawn ridge and a compass dial for the wind's direction: wakes cut the output of the turbines downwind, shown as dashed lines, a bar per turbine and a farm total.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Show what the wind does to a farm's output, with this wind farm map for Vue with Ark UI. Gustfield, a wind developer, draws twelve turbines on the contour lines of an invented ridge, Keldale Edge. The Angle Slider is a compass dial for the direction the wind comes from, N at the top, turned with the pointer or the arrow keys in steps of 5 degrees; arrows across the map point the way it blows. A turbine loses output to every other turbine that stands upwind of it, close enough and near enough to the wind's line, so turning the dial changes which turbines are shaded. A dashed line on the map joins a turbine to the ones it shades, and a ring turns dashed when a turbine loses 15 percent or more. The foot gives three figures, the farm's output against its rating, the share lost to wakes and the three most affected turbines, and the list under it has a row per turbine with its output as a Progress bar and its loss. A polite status line speaks the result once the dial settles. It's built from Angle Slider, Progress and Guides, with a CSS entrance only. For wind developers, grid operators and energy dashboards.

FAQ

How is the wake loss worked out?

Turbine A shades turbine B when A is within RANGE drawing units (130) of B and within CONE degrees (20) of the bearing the wind comes from. The loss is MAX_LOSS percent (60) less the farther away and the more off the line A stands, rounded, and a turbine adds up the losses it takes, capped at 60 percent. It is a simplified rule, not an engineering model: it ignores terrain, turbulence and wind speed, and the caption says so.

How do I use my own turbines?

Edit TURBINE_LINES: an id, a number, a position in the drawing's 480 by 360 units and the output in kW with a clear wind. RATED is each turbine's rating. In your app feed the free output from your turbine data, project real coordinates onto the map you use, and replace lossFrom with your wake model.

How do I use the dial without a mouse?

Focus the dial with Tab and use the arrow keys: each press turns it 5 degrees. It has a hidden input and a name, "Wind from, in degrees", and the visible line above the map says the direction in words ("Wind from the south-west, 225°"). The compass letters are decoration.

Can I use the map without a mouse?

Yes. The turbines are a list of buttons, one tab stop each, with the output as a bar and in megawatts and the loss as a percentage; pressing one highlights its wake lines on the map. The pins are hidden from assistive technology because the list says the same things in text.

What stays local in the demo, and how do I wire it up?

All of it. The turbines, their output and the wake rule are sample data, nothing is measured and nothing is sent. In your app read the wind direction from a feed and let the dial be the what-if control that overrides it.

How does it look on a phone?

The dial and the direction sentence stack above the map, the map keeps its full width and a taller fixed height, and the three figures stack under it. The turbine list is a box of fixed height that scrolls on its own, so the page does not jump when you turn the dial.