Skip to content

Widget width documentation lists outdated numeric values #1882

@rocky9878

Description

@rocky9878

The widget documentation (e.g. https://statamic.dev/widgets/updater) states that the width option accepts numeric percentage values: 25, 33, 50, 66, 75, 100.

However, in Dashboard.vue the numeric values are mapped to 4 responsive size buckets for backward compatibility:

  const legacyMap = {                                                                                                                                                                                                                                                                                
      25: 'sm',                                                                                                                                                                                                                                                                                      
      33: 'sm',   // same result as 25
      50: 'md',                                                                                                                                                                                                                                                                                      
      66: 'md',   // same result as 50
      75: 'lg',                                                                                                                                                                                                                                                                                      
      100: 'full'
  };                                                                                                                                                                                                                                                                                                 

This means 33 and 25 produce identical layouts, as do 66 and 50. The actual supported values are the string sizes sm, md, lg, and full.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions