vemu.

component

PeripheralSelector

Vertical list of inspectable peripherals (the left pane of PeripheralPanel). Renders human-friendly labels via `peripheralLabel` and highlights the current selection.

function PeripheralSelector(props: PeripheralSelectorProps): JSX.Element

Props

NameTypeDescription
peripheralsstring[]Names of the peripherals to list, in display order.
selectedstring | nullCurrently selected peripheral name, or null when nothing is selected.
onSelect(name: string) => voidCalled with the peripheral name when the user clicks an entry.

Examples

const [selected, setSelected] = useState<string | null>(null);
<PeripheralSelector peripherals={["kmu", "uicr"]} selected={selected} onSelect={setSelected} />