Skip to content
design
Components

VHF channel input

A marine VHF channel typed as its number or designator, with its frequencies under it, refusing the channels that carry no voice.

On this page
Ship 157.025 MHz, coast 161.625 MHz
156.800 MHz, distress, safety and calling
A marina's harbour office on channel 80 and the watch it keeps on 16, each with its frequencies under it.
Code
import { VhfChannelInput } from "@bosunkit/components/vhf-channel-input";
import { useState, type Dispatch, type ReactElement, type SetStateAction } from "react";

export const description: string =
  "A marina's entry: the channel the harbour office works on and the one it keeps a watch on. Each takes a number or " +
  "a designator, steps through the channels with the arrow keys and writes the frequencies under it.";

export default function Showcase(): ReactElement {
  const [working, setWorking]: [string, Dispatch<SetStateAction<string>>] = useState<string>("80");
  const [watch, setWatch]: [string, Dispatch<SetStateAction<string>>] = useState<string>("16");
  return (
    <div style={{ width: "100%", display: "flex", flexWrap: "wrap", gap: "var(--space-lg)" }}>
      <VhfChannelInput label="Harbour office" value={working} onValueChange={setWorking} />
      <VhfChannelInput label="Watch kept on" purpose="monitored" value={watch} onValueChange={setWatch} />
    </div>
  );
}

A VHF channel input holds a marine VHF channel as its designator: a channel number from 01 to 28 or 60 to 88, a four-digit simplex designator, or a UK marina channel. It reads a number with or without its leading zero and a word such as Ch or Kanal before it. It reads the four-digit designators of ITU-R M.1084 that name one side of a two-frequency channel used alone, 1022 for the ship side of 22 and 2087 for the coast side of 87, and the US letters that write the same, 22A and 87B. It also reads M or M1 and M2. When the crew leave the field it writes the designator, and under it the channel's frequencies: one for a single-frequency channel, the ship's and the coast station's 4.6 MHz above it for a two-frequency one. The frequencies follow from the channel's number, as the Radio Regulations' Appendix 18 numbers them. The channels it sets aside are said beside their frequency: 16 for distress, safety and calling, 13 bridge to bridge, 06 for search and rescue, 15 and 17 on board at 1 W, 75 and 76 for navigation at 1 W.

A channel that carries no voice is refused: 70 carries digital selective calls only, and 2087 and 2088 carry AIS. Text that names no channel, such as 99 or 16/9, is refused as well, and the text stays. With purpose="working", the default, channel 16 is questioned in an attention message, since two stations that work on it hold the distress channel; with purpose="monitored", for the channel a station keeps a watch on, 16 is taken without a question. The arrow keys step through the voice channels in their number order, past 70 and round from 88 to 01.

Examples

Empty

A number such as 72, or M1 for a UK marina
Empty: the hint says what the field takes.
Code
import { VhfChannelInput } from "@bosunkit/components/vhf-channel-input";
import type { ReactElement } from "react";

export const description: string = "Empty: the hint says what the field takes.";

export default function Empty(): ReactElement {
  return <VhfChannelInput label="Working channel" hint="A number such as 72, or M1 for a UK marina" />;
}

One frequency

156.650 MHz, navigation safety, bridge to bridge
A single-frequency channel writes its one frequency and, where the Radio Regulations set it aside, what for.
Code
import { VhfChannelInput } from "@bosunkit/components/vhf-channel-input";
import type { ReactElement } from "react";

export const description: string =
  "A single-frequency channel writes its one frequency and, where the Radio Regulations set it aside, what for.";

export default function Simplex(): ReactElement {
  return <VhfChannelInput label="Bridge to bridge" purpose="monitored" defaultValue="13" />;
}

Two frequencies

Ship 157.200 MHz, coast 161.800 MHz
A two-frequency channel writes the ship's frequency and the coast station's, 4.6 MHz above it.
Code
import { VhfChannelInput } from "@bosunkit/components/vhf-channel-input";
import type { ReactElement } from "react";

export const description: string =
  "A two-frequency channel writes the ship's frequency and the coast station's, 4.6 MHz above it.";

export default function Duplex(): ReactElement {
  return <VhfChannelInput label="Coast station" defaultValue="24" />;
}

Four-digit designators

157.100 MHz
A four-digit designator names one side of a two-frequency channel used alone: 1022, typed as 1022 or as the US 22A, is 22's ship frequency.
Code
import { VhfChannelInput } from "@bosunkit/components/vhf-channel-input";
import type { ReactElement } from "react";

export const description: string =
  "A four-digit designator names one side of a two-frequency channel used alone: 1022, typed as 1022 or as the US 22A, " +
  "is 22's ship frequency.";

export default function SimplexDesignator(): ReactElement {
  return <VhfChannelInput label="Coast Guard working" defaultValue="22A" />;
}

Questioned

156.800 MHz, distress, safety and calling
Channel 16 is kept for distress, safety and calling. Arrange a working channel, such as 72.
Channel 16 as a working channel is questioned: it is kept for distress, safety and calling. As a monitored channel it is taken without a question.
Code
import { VhfChannelInput } from "@bosunkit/components/vhf-channel-input";
import type { ReactElement } from "react";

export const description: string =
  "Channel 16 as a working channel is questioned: it is kept for distress, safety and calling. As a monitored channel " +
  "it is taken without a question.";

export default function Questioned(): ReactElement {
  return <VhfChannelInput label="Working channel" defaultValue="16" />;
}

Invalid

A channel that carries no voice, 70 for digital selective calling or an AIS channel, is refused, and so is text that names no channel; the text stays.
Code
import { VhfChannelInput } from "@bosunkit/components/vhf-channel-input";
import type { ReactElement } from "react";

export const description: string =
  "A channel that carries no voice, 70 for digital selective calling or an AIS channel, is refused, and so is text " +
  "that names no channel; the text stays.";

export default function Invalid(): ReactElement {
  return (
    <VhfChannelInput
      label="Working channel"
      defaultValue="70"
      error="Channel 70 carries digital selective calls only, never voice. Choose a voice channel, such as 72."
    />
  );
}

Disabled

Disabled: dimmed, and takes no input.
Code
import { VhfChannelInput } from "@bosunkit/components/vhf-channel-input";
import type { ReactElement } from "react";

export const description: string = "Disabled: dimmed, and takes no input.";

export default function Disabled(): ReactElement {
  return <VhfChannelInput label="Working channel" disabled />;
}

Props

PropTypeDefaultDescription
labelstring | undefined–The field's name on the outline, translated by the caller; omit it inside a FormField.
valuestring | undefined–The channel's designator ("16", "72", "1022", "M1"); "" for none.
defaultValuestring | undefined–The channel it starts with when the caller does not hold value.
onValueChange((designator: string) => void) | undefined–Called with the designator when the crew step it with the keys, or type a channel and leave the field.
purposeVhfChannelPurpose | undefined"working"A working channel (by default), where 16 is questioned, or a monitored one, where it is not.
hintstring | undefined–Text under the field while it holds no channel, translated by the caller.
errorstring | undefined–The caller's own error, shown in place of the field's.
requiredboolean | undefined–Whether the field must hold a channel.
disabledboolean | undefined–Whether the field takes no input.
readOnlyboolean | undefined–Whether the field shows its channel without letting the crew change it.
idstring | undefined–The input's id, for a Label's htmlFor.
namestring | undefined–The form field name; the form receives the designator.
aria-labelstring | undefined–Names the input when there is no label.
classNamestring | undefined–Classes added to the field's root.
testIdstring | undefined–data-testid on the field.
refRef<HTMLInputElement> | undefined–The input element.
motionMotionProp | undefined–How the error line moves; as FormField's, an error that appears rises in by default.