Axon 911 Frontend DocsAxon 911 Frontend Docs
Axon 911 Frontend Docs
    Loading navigation…
U
User
Switch to light mode
  1. Blocks
  2. Control Island
  3. API and Development

ControlIsland API

View SourceOpens in a new tabSubmit IssueOpens in a new tab
Import ControlIsland, ControlIslandRole, and ControlIslandStatus from @prepared911/ui/blocks/control-island.
PropTypeDefault
labelLocalizedMessagerequired
rolesreadonly ControlIslandRoleItem[]required
roleControlIslandRole—
defaultRoleControlIslandRolefirst role
onRoleChange(role, details) => void—
raiseHandIconGlyphrequired
raiseHandLabelLocalizedMessagerequired
raisedHandboolean—
defaultRaisedHandbooleanfalse
onRaisedHandChange(raised, details) => void—
availabilityControlIslandAvailability—
sizeButtonSizeMedium
classNamestring—
idstring—
refRef<HTMLDivElement>—
ControlIslandRole: Supervisor, Calltaker, Dispatcher. ref, id, and className land on the host around the Expanding ButtonGroup. ControlIslandRoleItem: role (ControlIslandRole), icon (Glyph), label (LocalizedMessage), optional queueLabel for Calltaker and Dispatcher.
ControlIslandAvailability
Pass on availability when the call taker role should show the status pill.
PropTypeDefault
statusControlIslandStatus (Ready, OnBreak, NotReady, OnCall, Ringing)uncontrolled
defaultStatusControlIslandStatusReady
onStatusChange(status: ControlIslandChoosableStatus, details: ChangeDetails) => voidnone
statusItemsRecord<ControlIslandStatus, { label: LocalizedMessage; icon: Glyph }>required
statusMenuLabelLocalizedMessagerequired
statusMenuIconGlyph (chevron on choosable pills)required
ringingAnnouncementLocalizedMessagerequired
ControlIslandChoosableStatus is Ready | OnBreak | NotReady. onStatusChange is never called with OnCall or Ringing.
Props
NameTypeDefaultDescription
labelLocalizedMessage—Accessible name of the island (role="group"), such as "Role and availability".
raiseHandIconGlyph—Glyph of the raise hand control in operator role content.
raiseHandLabelLocalizedMessage—Name of the raise hand control, such as "Raise hand". It does not change with the pressed state.
rolesreadonly ControlIslandRoleItem[]—Roles the person may work in, in display order. The island never infers access beyond this list.
availabilityControlIslandAvailability—Call taker availability copy and state. When passed, the call taker role's content ends in the status pill; when omitted, the call taker has no status control.
classNamestring—Classes appended to the island's host.
defaultRaisedHandbooleanfalseInitial raised state when uncontrolled.
defaultRoleControlIslandRoleThe first entry of `roles`Selected role on first render when uncontrolled.
idstring—Id of the island's host element.
onRaisedHandChange((raised: boolean, details: ChangeDetails<ChangeReason>) => void)—Called with the next state when the raise hand control is pressed. Cancel the details to keep the previous state. @param raised - Next raised state @param details - Change metadata
onRoleChange((role: ControlIslandRole, details: ChangeDetails<ChangeReason>) => void)—Called when a role segment is pressed, with ChangeReason.ItemPress. Pressing the selected role does not call it. Cancel the details to keep the previous role. @param role - The pressed role @param details - Change metadata
raisedHandboolean—Whether the hand is raised when controlled. Pair with onRaisedHandChange.
refRef<HTMLDivElement>—Ref to the island's host element.
roleControlIslandRole—Selected role when controlled. Pair with onRoleChange.
sizeButtonSizeButtonSize.MediumControl height of the island's controls, from the shared scale (ADR 0012). The role segments, the raise hand control, and the status pill all follow it. A pill is the control height plus its 1px edge on each side, and the island is a pill plus a 4px inset on each side: Medium is a 38px island with 30px pills.
Storybook
Interactive examples and edge cases for this component are in Storybook.
DefaultOpens in a new tab
Previous
Control Island / Accessibility
Next
Control Island / ControlIsland usage
On this page
ControlIslandAvailability
Props
Storybook