Knit UI
GitHub

Playground

Loading playground…

true
Playground
<AudioRecorder
  size="md"
  controls
  options={RECORDING_PRESETS.HIGH_QUALITY}
/>

Examples

Default

Loading example…

DefaultSourceStorybook

With Meter

Metering enabled — the input-level bar tracks the microphone in real time.

Loading example…

With MeterSourceStorybook

Sizes

Loading example…

SizesSourceStorybook

Custom Layout

Compose a custom bar from the exported parts.

Loading example…

Custom LayoutSourceStorybook

Styles

Per-slot style overrides.

Loading example…

StylesSourceStorybook

Props

PropTypeDefaultDescription
controlsReactNodetrueThe control chrome. `true` (default) renders the built-in control bar; `false` renders no chrome; a node renders custom chrome inside the context.
getController((controller: AudioRecorderController) => void) | undefined—Receives the controller once ready.
labelstring | undefined—Accessible label for the recorder region. Default `"Audio recorder"`.
maxWidthnumber | Animated.AnimatedNode | GetThemeValueForKey<"maxWidth"> | null | undefined—Frame max width.
meteringEnabledboolean | undefined—Enable input-level metering. Overrides `options.isMeteringEnabled`.
onRecordingChange((isRecording: boolean) => void) | undefined—Fired whenever recording starts/stops.
onStop((uri: string | null) => void) | undefined—Fired when a recording is finalized, with its file URI.
optionsRecordingOptions | undefined—Full recording options. Defaults to the `HIGH_QUALITY` preset.
size system"xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | undefined
xs · sm · md · lg · xl
mdControl sizing scale. Default `'md'`.
styles systemSlotStyles<AudioRecorderStyles> | undefined—Per-slot style overrides.
testIDstring | undefined——
widthnumber | GetThemeValueForKey<"width"> | Animated.AnimatedNode | null | undefined—Frame width.

Style slots

Every part of AudioRecorder can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotTargets
controlBar—
duration—
meterFill—
meterTrack—
root—

Edit this page on GitHub