kit

Segmented control

Built revision v17.10.0

Phoenix
Topics

Human support

Bring a missing role, layout, or state, or a rendering against the standard, to the session working on kit. Name the package and the entry.

On Find, Calendar

Segmented control

Charge by
Day Applies to every booking of this room.

Charge by while bookings cannot be changed.

Charge by
Day
Show bookings as
Show bookings as
Source
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-segmented-charge">
  <:label>Charge by</:label>
  <:control_set :let={binding}>
    <Kit.Phoenix.Roles.SegmentedControl.segmented_control binding={binding} name="charge" value="day">
      <:option value="hour">Hour</:option>
      <:option value="day">Day</:option>
      <:option value="week">Week</:option>
    </Kit.Phoenix.Roles.SegmentedControl.segmented_control>
  </:control_set>
  <:help>Applies to every booking of this room.</:help>
  <:printed_value>Day</:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>
<p class="specimen-case-line">Charge by while bookings cannot be changed.</p>
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-segmented-charge-disabled">
  <:label>Charge by</:label>
  <:control_set :let={binding}>
    <Kit.Phoenix.Roles.SegmentedControl.segmented_control binding={binding} name="charge-disabled" value="day">
      <:option value="hour" rest={%{disabled: true}}>Hour</:option>
      <:option value="day" rest={%{disabled: true}}>Day</:option>
      <:option value="week" rest={%{disabled: true}}>Week</:option>
    </Kit.Phoenix.Roles.SegmentedControl.segmented_control>
  </:control_set>
  <:printed_value>Day</:printed_value>
</Kit.Phoenix.Roles.FormGroup.form_group>
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-segmented-view">
  <:label>Show bookings as</:label>
  <:control_set :let={binding}>
    <Kit.Phoenix.Roles.SegmentedControl.segmented_control binding={binding} name="view" value="list">
      <:option value="list" icon="list">List</:option>
      <:option value="board" icon="kanban">Board</:option>
      <:option value="calendar" icon="calendar-blank">Calendar</:option>
    </Kit.Phoenix.Roles.SegmentedControl.segmented_control>
  </:control_set>
</Kit.Phoenix.Roles.FormGroup.form_group>
<Kit.Phoenix.Roles.FormGroup.form_group id="phoenix-segmented-view-narrow" style="inline-size: var(--kit-field-medium)">
  <:label>Show bookings as</:label>
  <:control_set :let={binding}>
    <Kit.Phoenix.Roles.SegmentedControl.segmented_control binding={binding} name="view-narrow" value="board">
      <:option value="list" icon="list">List</:option>
      <:option value="board" icon="kanban">Board</:option>
      <:option value="calendar" icon="calendar-blank">Calendar</:option>
    </Kit.Phoenix.Roles.SegmentedControl.segmented_control>
  </:control_set>
</Kit.Phoenix.Roles.FormGroup.form_group>