Skip to content

Type – Radio

Henner R Setyono edited this page Mar 12, 2020 · 8 revisions

'header_button_size' => [
  'label' => __( 'Size' ),
  'type' => 'ct-radio',
  'choices' => [
    'small' => __( 'Small' ),
    'medium' => __( 'Medium' ),
    'large' => __( 'Large' ),
  ],
],

allow_empty

If true, allow you to untick the choice.

responsive

Set different choices based on screen size

'responsive' => true,
'choices' => [ ... ],
'tabletChoices' => [ ... ],
'mobileChoices' => [ ... ],

If you want to disable specific screen size:

'responsive' => [
  'desktop' => true,
  'tablet' => true,
  'mobile' => false,
],
'disabledDeviceMessage' => __( 'This element is hidden on mobile' ),

Value Format

'header_button_size' => 'medium'

If responsive:

'header_button_size' => [
  'desktop' => 'medium',
  'tablet' => 'small',
  'mobile' => 'small',
]

Alignment Radio

'top_button_alignment' => [
  'label' => __( 'Alignment' ),
  'type' => 'ct-radio/alignment',
],

If you only need left & right, use the type ct-radio/alignment-no-center

Values:

  • left
  • center
  • right