Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Clip Selector Audio File Upload Block for Vue

A waveform drawn from typed peaks with a two-thumb slider that sets the clip, a live readout like Clip 0:42 to 1:30 (48 s), a spec list and a single-file zone for your own sample.

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

Mark the part of a sample worth keeping, with this audio upload panel for Vue with Ark UI. It is the clip step of Echolane, a sample library for producers. Pick one of three typed samples and its waveform is drawn from typed peaks; a two-thumb Slider sets the clip, bars inside the clip are drawn at full weight and the rest lighter, and the readout under the wave says "Clip 0:42 to 1:30 (48 s)". A Data List gives the format, bitrate, sample rate, channels and length, and a File Upload zone takes one of your own files. The panel is ruled by Guides and the one primary is a Shine Button. For sample libraries, stock audio and any upload step that stores only part of a file.

FAQ

What stays local in the demo?

Everything. No audio plays, and nothing is uploaded or saved. The three samples and their peaks are typed, and the bars are drawn as SVG. A file you pick is listed by name and size and never opened, so its length and specs say "Not read", its wave is a stand-in drawn from its name and the clip slider waits. To wire it for real, decode the file on the server or with the Web Audio API, replace the typed peaks with the real ones, and send the clip start and end with the upload.

How does the clip selector work?

The slider has two thumbs in seconds, one second apart at the least where the library enforces it. Bars whose centre falls inside the clip are drawn at full weight; the others stay lighter, so the selection reads without colour. The readout is worked out from the two values: start, end and the length in seconds. Each thumb is spoken as Clip start or Clip end with its time.

Can I set the clip from the keyboard?

Yes. Focus a thumb and use the arrow keys for one second, Page Up and Page Down for larger steps, and Home and End for the ends. In a right-to-left language the slider keeps its direction so times read the same way.

Why is my own file not drawn?

The block never reads a picked file, so it cannot know the file's length or shape. It shows a stand-in wave made from the file name, says the specs are not read, and disables the clip slider and the Add button until you choose a typed sample. A real build would read the file first.

What files does the zone accept?

WAV, FLAC, MP3, AIFF and OGG up to 200 MB, one file at a time. A second pick replaces the first and the status line says so. A refused file is named in the polite status line.

Does it follow my theme?

Yes. Bars, thumbs and the clip fill use the foreground token and its lighter weights, so the panel reads the same in every preset and in dark mode.