Skip to content

Controls

Specifically styled versions of elements for use in controlling components such as carousels.

Pips

Pip indicators provide an accessible way to navigate between items in a carousel or similar component. They use native radio inputs styled to provide a visual indicator of the current selection.

The pip indicators are built using native HTML radio inputs, providing built-in accessibility and state management without JavaScript. Each pip expands when selected and includes proper ARIA labels for screen readers.

CSS Variables

VariableDefault ValueDescription
--control-pip-wrapper-padding1remPadding around the pip container
--control-pip-wrapper-margin0Margin around the pip container
--control-pip-wrapper-min-height48pxMinimum height of the pip container
--control-pip-wrapper-backgroundtransparentBackground color of the pip container
--control-pip-wrapper-border-radiusvar(--radius-none)Border radius of the pip container
--control-pip-size12pxSize of individual pip indicators
--control-pip-gap8pxSpace between pip indicators
--control-pip-active-width36pxWidth of the active pip indicator
--control-pip-colorvar(--color-neutral-300)Default color of pip indicators
--control-pip-active-colorvar(--color-primary-700)Color of the active pip indicator
--control-pip-hover-colorvar(--color-primary-700)Color of pip indicators on hover
--control-pip-focus-ring-width2pxWidth of the focus ring
--control-pip-focus-ring-offset2pxOffset of the focus ring
--control-pip-focus-ring-colorvar(--color-primary-700)Color of the focus ring
--control-pip-focus-ring-stylesolidStyle of the focus ring
--control-pip-disabled-backgroundvar(--color-neutral-300)Background color of disabled pips
--control-pip-hover-scale1.1Scale factor for pip hover effect
--control-pip-disabled-opacity0.5Opacity of disabled pip indicators
--control-pip-active-transitionwidth var(--duration-speed-quick) ease, background-color var(--duration-speed-quick) easeTransition for active state
--control-pip-hover-transitiontransform var(--duration-speed-quick) easeTransition for hover state
--control-pip-wrapper-mobile-padding0.5remPadding around pip container on mobile
--control-pip-mobile-size10pxSize of pip indicators on mobile
--control-pip-mobile-active-width30pxWidth of active pip indicator on mobile

Accessibility

Implemented Accessibility Features

  • Complete keyboard navigation support through native radio controls
  • Semantic structure using radiogroup role
  • Clear descriptive labels for navigation (“Show item X of Y”)
  • Purpose description via aria-description for keyboard usage
  • Screen reader context through sr-only class
  • Visual focus indicators through native radio states
  • Proper use of semantic HTML with <label> elements
  • Current state indication through native radio checked state
  • Content relationships via aria-controls
  • Touch-friendly target sizes through label wrapping
  • Motion-respecting animations using prefers-reduced-motion
  • Consistent naming patterns across all controls

Accessibility Considerations when Implementing

  • Ensure radio input names are unique per instance
  • Match aria-controls values with corresponding content IDs
  • Maintain proper tab order matching visual presentation
  • Consider auto-advance pause on focus/hover
  • Handle dynamic content updates appropriately
  • Maintain state synchronization between controls and content

Control Buttons

Specifically styled buttons to provide clear and identifiable site controls.

Basic Control Button

The control-btn class can be applied along side the btn class (see Button Component).

CSS Variables

VariableDefault ValueDescription
--control-btn-backgroundvar(--color-white)Background color of control buttons
--control-btn-colorvar(--color-primary)Color of control button icons
--control-btn-hover-colorvar(--color-primary-darker)Color of control button icons on hover
--control-btn-active-colorvar(--color-primary-darker)Color of control button icons when active
--control-btn-background-hovervar(--color-neutral-200)Background color on hover
--control-btn-background-activevar(--color-neutral-300)Background color when active
--control-btn-border-width1pxWidth of control button border
--control-btn-size48pxSize of control buttons
--control-btn-shadowvar(--shadow-default)Default shadow for control buttons
--control-btn-shadow-hovervar(--shadow-hover)Shadow on hover for control buttons
--control-btn-shadow-activevar(--shadow-active)Shadow when active for control buttons
--control-btn-radiusvar(--radius-none)Border radius of control buttons
--control-btn-outline-colorvar(--color-primary-700)Border color of control buttons

Combined Control Buttons

Horizontal Bar

When using multiple control buttons, they can be wrapped in a control-bar. This ensure uniform borders between buttons, creating a cohesive collection of control buttons.

Vertical Bar

The control-bar-vertical class can be used instead if a vertical control bar is desired.

CSS Variables

VariableDefault ValueDescription
--control-btn-item-gap0remGap between control buttons