Skip to content

Human and agent selector

The selector at the bottom of the window switches a page between two views. Human shows the page as designed, and Agent shows the same content as plain text.

One page, two views

Human
Agent

It floats at the bottom center of the window, in the same place on each page, and your choice holds as you move from page to page. For agents describes what the Agent view holds.

Anatomy

A capsule with two options, the chosen one filled in Werklist blue. It floats above the page and the header, and below menus and dialogs.

Height
48 px
Option
40 px high, 16 px padding each side
--space-4
Inner padding
4 px
--space-1
Label
14 px on 20 px, weight 500
--type-nav
Shape
Full radius
--radius-full
Surface
Raised
--surface-1
Shadow
Level 2
--elevation-2
Distance from the bottom
16 px plus the safe area
Layer
Above the header, below menus and dialogs
--layer-selector

States

The blue moves to the option you choose, with a 150 ms fade that reduced motion drops. In high contrast mode, where fills disappear, the chosen option keeps an outline.

The selector hides when you print, and while a dialog or the menu is open.

Human chosen
Agent chosen
Option at rest
Muted ink
--text-muted
Option on hover
Control fill, full ink
--surface-control
Chosen option
Werklist blue, white label
--brand-true
Focus
2 px ring
--focus-ring

Keyboard and screen readers

The selector is a radio group named View, placed right after the skip link, so the keyboard reaches it before the header. Choosing a view changes the page at once and leaves focus on the selector.

Tab
Reaches the chosen option
Arrow keys
Move to the other option and choose it
Home and End
Choose the first or the last option

Permitted and not permitted

Permitted

  • Two options with plain names

    Human and Agent.

Not permitted

  • A switch or a checkbox for the view

    The two views are equals, not on and off.

  • Hiding the selector while you scroll

    People look for it in the same place each time.

  • More controls in the capsule

    The theme switch has its own place at the top.

NextDialog

Human and agent selector

A floating radio group of two that switches a page between its designed view and a plain text view.

  • Kind: component
  • Page: https://design.werklist.com/components/view-selector
  • Version: 2.1.2

When to use it

  • On every page, fixed at the bottom center of the window.

When not to use it

  • In print.
  • A third option, the theme included.
  • Hiding it while the page scrolls.

Rules

  • The page keeps its scroll position after a switch.
  • Leave free room at the end of each page, so the selector never covers the last line.

Anatomy

  • Capsule: fixed 16 px above the bottom safe area, centered in the window, 48 px high, inner padding 4 px, 2 px between options, full radius, no border (--surface-1, --elevation-2, --radius-full, --space-1, --layer-selector)
  • Option: 40 px high, 16 px at each side, full radius (--type-nav, --space-4)
  • Chosen fill: Werklist blue with a white label. The fill changes color in 150 ms, it does not slide (--brand-true, --on-brand, --duration-fast, --ease-standard)

States

  • Rest: Muted ink (--text-muted)
  • Hover: Control fill and full ink on the option not chosen (--surface-control, --text)
  • Chosen: Werklist blue fill, white label, aria-checked true (--brand-true, --on-brand)
  • Focus: 2 px ring, 2 px offset (--focus-ring)
  • Reduced motion: The color changes at once
  • Forced colors: The capsule is outlined, and the chosen option keeps a 1 px outline
  • At the footer: Stays at the foot of the window, over the footer too, to the end of the page
  • Hidden: In print, and while a dialog or the menu is open

Keyboard

  • Tab: Reaches the chosen option
  • ArrowLeft, ArrowRight, ArrowUp, ArrowDown: Move to the other option and choose it
  • Home, End: Choose the first or the last option
  • Space: Chooses the focused option

Accessibility

  • A radio group named View, with two radio options.
  • It comes right after the skip link, before the header.
  • Focus stays on the selector after a switch.
  • Muted ink and the white label on blue meet 4.5 to 1 in both themes.

Content

  • Option labels: Human, Agent.
  • Group name: View.

Tokens

  • --surface-1
  • --elevation-2
  • --radius-full
  • --space-1
  • --space-4
  • --type-nav
  • --text
  • --text-muted
  • --surface-control
  • --brand-true
  • --on-brand
  • --focus-ring
  • --layer-selector
  • --duration-fast
  • --ease-standard

JSON

{
  "title": "Human and agent selector",
  "path": "/components/view-selector",
  "url": "https://design.werklist.com/components/view-selector",
  "text": "https://design.werklist.com/agent/components/view-selector",
  "summary": "The control at the bottom of the window that switches a page between its designed view and a plain text view.",
  "version": "2.1.2",
  "kind": "component",
  "name": "Human and agent selector",
  "purpose": "A floating radio group of two that switches a page between its designed view and a plain text view.",
  "use": [
    "On every page, fixed at the bottom center of the window."
  ],
  "avoid": [
    "In print.",
    "A third option, the theme included.",
    "Hiding it while the page scrolls."
  ],
  "anatomy": [
    {
      "part": "Capsule",
      "measure": "fixed 16 px above the bottom safe area, centered in the window, 48 px high, inner padding 4 px, 2 px between options, full radius, no border",
      "token": "--surface-1, --elevation-2, --radius-full, --space-1, --layer-selector"
    },
    {
      "part": "Option",
      "measure": "40 px high, 16 px at each side, full radius",
      "token": "--type-nav, --space-4"
    },
    {
      "part": "Chosen fill",
      "measure": "Werklist blue with a white label. The fill changes color in 150 ms, it does not slide",
      "token": "--brand-true, --on-brand, --duration-fast, --ease-standard"
    }
  ],
  "states": [
    {
      "name": "Rest",
      "change": "Muted ink",
      "tokens": [
        "--text-muted"
      ]
    },
    {
      "name": "Hover",
      "change": "Control fill and full ink on the option not chosen",
      "tokens": [
        "--surface-control",
        "--text"
      ]
    },
    {
      "name": "Chosen",
      "change": "Werklist blue fill, white label, aria-checked true",
      "tokens": [
        "--brand-true",
        "--on-brand"
      ]
    },
    {
      "name": "Focus",
      "change": "2 px ring, 2 px offset",
      "tokens": [
        "--focus-ring"
      ]
    },
    {
      "name": "Reduced motion",
      "change": "The color changes at once"
    },
    {
      "name": "Forced colors",
      "change": "The capsule is outlined, and the chosen option keeps a 1 px outline"
    },
    {
      "name": "At the footer",
      "change": "Stays at the foot of the window, over the footer too, to the end of the page"
    },
    {
      "name": "Hidden",
      "change": "In print, and while a dialog or the menu is open"
    }
  ],
  "keys": [
    {
      "key": "Tab",
      "action": "Reaches the chosen option"
    },
    {
      "key": "ArrowLeft, ArrowRight, ArrowUp, ArrowDown",
      "action": "Move to the other option and choose it"
    },
    {
      "key": "Home, End",
      "action": "Choose the first or the last option"
    },
    {
      "key": "Space",
      "action": "Chooses the focused option"
    }
  ],
  "accessibility": [
    "A radio group named View, with two radio options.",
    "It comes right after the skip link, before the header.",
    "Focus stays on the selector after a switch.",
    "Muted ink and the white label on blue meet 4.5 to 1 in both themes."
  ],
  "content": [
    "Option labels: Human, Agent.",
    "Group name: View."
  ],
  "rules": [
    "The page keeps its scroll position after a switch.",
    "Leave free room at the end of each page, so the selector never covers the last line."
  ],
  "tokens": [
    "--surface-1",
    "--elevation-2",
    "--radius-full",
    "--space-1",
    "--space-4",
    "--type-nav",
    "--text",
    "--text-muted",
    "--surface-control",
    "--brand-true",
    "--on-brand",
    "--focus-ring",
    "--layer-selector",
    "--duration-fast",
    "--ease-standard"
  ]
}

Raw file: https://design.werklist.com/agent/components/view-selector