@central-design-system/skills 4.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +6 -0
- package/README.md +218 -0
- package/bin/cds-skills.mjs +124 -0
- package/package.json +33 -0
- package/skills/cds-builder/GENERATION.md +44 -0
- package/skills/cds-builder/SKILL.md +308 -0
- package/skills/cds-builder/references/component-decision-tree.md +310 -0
- package/skills/cds-builder/references/components/cds-app/api.md +19 -0
- package/skills/cds-builder/references/components/cds-app/tokens.md +12 -0
- package/skills/cds-builder/references/components/cds-autocomplete/api.md +155 -0
- package/skills/cds-builder/references/components/cds-autocomplete/examples.md +447 -0
- package/skills/cds-builder/references/components/cds-autocomplete/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-autocomplete/tokens.md +19 -0
- package/skills/cds-builder/references/components/cds-avatar/api.md +35 -0
- package/skills/cds-builder/references/components/cds-avatar/examples.md +240 -0
- package/skills/cds-builder/references/components/cds-avatar/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-avatar/tokens.md +32 -0
- package/skills/cds-builder/references/components/cds-badge/api.md +44 -0
- package/skills/cds-builder/references/components/cds-badge/examples.md +332 -0
- package/skills/cds-builder/references/components/cds-badge/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-badge/tokens.md +32 -0
- package/skills/cds-builder/references/components/cds-breadcrumbs/api.md +83 -0
- package/skills/cds-builder/references/components/cds-breadcrumbs/examples.md +219 -0
- package/skills/cds-builder/references/components/cds-breadcrumbs/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-breadcrumbs/tokens.md +24 -0
- package/skills/cds-builder/references/components/cds-button/api.md +66 -0
- package/skills/cds-builder/references/components/cds-button/examples.md +324 -0
- package/skills/cds-builder/references/components/cds-button/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-button/tokens.md +190 -0
- package/skills/cds-builder/references/components/cds-button-group/api.md +27 -0
- package/skills/cds-builder/references/components/cds-button-group/examples.md +33 -0
- package/skills/cds-builder/references/components/cds-button-group/tokens.md +17 -0
- package/skills/cds-builder/references/components/cds-button-toggle/api.md +51 -0
- package/skills/cds-builder/references/components/cds-button-toggle/examples.md +278 -0
- package/skills/cds-builder/references/components/cds-button-toggle/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-button-toggle/tokens.md +13 -0
- package/skills/cds-builder/references/components/cds-card/api.md +221 -0
- package/skills/cds-builder/references/components/cds-card/examples.md +652 -0
- package/skills/cds-builder/references/components/cds-card/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-card/tokens.md +46 -0
- package/skills/cds-builder/references/components/cds-carousel/api.md +107 -0
- package/skills/cds-builder/references/components/cds-carousel/examples.md +444 -0
- package/skills/cds-builder/references/components/cds-carousel/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-carousel/tokens.md +17 -0
- package/skills/cds-builder/references/components/cds-checkbox/api.md +93 -0
- package/skills/cds-builder/references/components/cds-checkbox/examples.md +319 -0
- package/skills/cds-builder/references/components/cds-checkbox/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-checkbox/tokens.md +18 -0
- package/skills/cds-builder/references/components/cds-checkbox-button/api.md +56 -0
- package/skills/cds-builder/references/components/cds-checkbox-button/examples.md +29 -0
- package/skills/cds-builder/references/components/cds-checkbox-button/tokens.md +56 -0
- package/skills/cds-builder/references/components/cds-combobox/api.md +158 -0
- package/skills/cds-builder/references/components/cds-combobox/examples.md +264 -0
- package/skills/cds-builder/references/components/cds-combobox/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-combobox/tokens.md +19 -0
- package/skills/cds-builder/references/components/cds-counter/api.md +24 -0
- package/skills/cds-builder/references/components/cds-counter/examples.md +93 -0
- package/skills/cds-builder/references/components/cds-counter/tokens.md +11 -0
- package/skills/cds-builder/references/components/cds-date-input/api.md +151 -0
- package/skills/cds-builder/references/components/cds-date-input/examples.md +479 -0
- package/skills/cds-builder/references/components/cds-date-input/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-date-input/tokens.md +16 -0
- package/skills/cds-builder/references/components/cds-date-picker/api.md +63 -0
- package/skills/cds-builder/references/components/cds-date-picker/examples.md +394 -0
- package/skills/cds-builder/references/components/cds-date-picker/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-date-picker/tokens.md +66 -0
- package/skills/cds-builder/references/components/cds-defaults-provider/api.md +21 -0
- package/skills/cds-builder/references/components/cds-description/api.md +22 -0
- package/skills/cds-builder/references/components/cds-description/examples.md +69 -0
- package/skills/cds-builder/references/components/cds-description/tokens.md +11 -0
- package/skills/cds-builder/references/components/cds-divider/api.md +29 -0
- package/skills/cds-builder/references/components/cds-divider/examples.md +374 -0
- package/skills/cds-builder/references/components/cds-divider/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-divider/tokens.md +38 -0
- package/skills/cds-builder/references/components/cds-drawer/api.md +53 -0
- package/skills/cds-builder/references/components/cds-drawer/examples.md +432 -0
- package/skills/cds-builder/references/components/cds-drawer/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-drawer/tokens.md +27 -0
- package/skills/cds-builder/references/components/cds-empty-state/api.md +55 -0
- package/skills/cds-builder/references/components/cds-empty-state/examples.md +330 -0
- package/skills/cds-builder/references/components/cds-empty-state/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-empty-state/tokens.md +25 -0
- package/skills/cds-builder/references/components/cds-expandable-panel/api.md +157 -0
- package/skills/cds-builder/references/components/cds-expandable-panel/examples.md +569 -0
- package/skills/cds-builder/references/components/cds-expandable-panel/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-expandable-panel/tokens.md +34 -0
- package/skills/cds-builder/references/components/cds-field/api.md +62 -0
- package/skills/cds-builder/references/components/cds-field/examples.md +202 -0
- package/skills/cds-builder/references/components/cds-field/tokens.md +94 -0
- package/skills/cds-builder/references/components/cds-file-input/api.md +109 -0
- package/skills/cds-builder/references/components/cds-file-input/examples.md +368 -0
- package/skills/cds-builder/references/components/cds-file-input/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-file-input/tokens.md +15 -0
- package/skills/cds-builder/references/components/cds-file-upload/api.md +296 -0
- package/skills/cds-builder/references/components/cds-file-upload/examples.md +411 -0
- package/skills/cds-builder/references/components/cds-file-upload/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-file-upload/tokens.md +50 -0
- package/skills/cds-builder/references/components/cds-footer/api.md +35 -0
- package/skills/cds-builder/references/components/cds-footer/examples.md +219 -0
- package/skills/cds-builder/references/components/cds-footer/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-footer/tokens.md +14 -0
- package/skills/cds-builder/references/components/cds-form/api.md +48 -0
- package/skills/cds-builder/references/components/cds-form/examples.md +552 -0
- package/skills/cds-builder/references/components/cds-form/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-form/tokens.md +15 -0
- package/skills/cds-builder/references/components/cds-functional-button/api.md +34 -0
- package/skills/cds-builder/references/components/cds-functional-button/examples.md +254 -0
- package/skills/cds-builder/references/components/cds-functional-button/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-functional-button/tokens.md +35 -0
- package/skills/cds-builder/references/components/cds-grid/api.md +66 -0
- package/skills/cds-builder/references/components/cds-grid/examples.md +687 -0
- package/skills/cds-builder/references/components/cds-grid/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-header/api.md +35 -0
- package/skills/cds-builder/references/components/cds-header/examples.md +345 -0
- package/skills/cds-builder/references/components/cds-header/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-header/tokens.md +13 -0
- package/skills/cds-builder/references/components/cds-highlight/api.md +22 -0
- package/skills/cds-builder/references/components/cds-highlight/examples.md +313 -0
- package/skills/cds-builder/references/components/cds-highlight/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-highlight/tokens.md +18 -0
- package/skills/cds-builder/references/components/cds-icon/api.md +33 -0
- package/skills/cds-builder/references/components/cds-icon/examples.md +272 -0
- package/skills/cds-builder/references/components/cds-icon/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-icon/tokens.md +30 -0
- package/skills/cds-builder/references/components/cds-image/api.md +67 -0
- package/skills/cds-builder/references/components/cds-image/examples.md +437 -0
- package/skills/cds-builder/references/components/cds-image/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-image/tokens.md +14 -0
- package/skills/cds-builder/references/components/cds-input/api.md +80 -0
- package/skills/cds-builder/references/components/cds-input/examples.md +205 -0
- package/skills/cds-builder/references/components/cds-input/tokens.md +108 -0
- package/skills/cds-builder/references/components/cds-label/api.md +25 -0
- package/skills/cds-builder/references/components/cds-label/examples.md +72 -0
- package/skills/cds-builder/references/components/cds-label/tokens.md +12 -0
- package/skills/cds-builder/references/components/cds-layout/api.md +50 -0
- package/skills/cds-builder/references/components/cds-layout/examples.md +431 -0
- package/skills/cds-builder/references/components/cds-layout/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-layout/tokens.md +12 -0
- package/skills/cds-builder/references/components/cds-link/api.md +33 -0
- package/skills/cds-builder/references/components/cds-link/examples.md +195 -0
- package/skills/cds-builder/references/components/cds-link/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-link/tokens.md +16 -0
- package/skills/cds-builder/references/components/cds-list/api.md +329 -0
- package/skills/cds-builder/references/components/cds-list/examples.md +653 -0
- package/skills/cds-builder/references/components/cds-list/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-list/tokens.md +125 -0
- package/skills/cds-builder/references/components/cds-loader/api.md +18 -0
- package/skills/cds-builder/references/components/cds-loader/examples.md +59 -0
- package/skills/cds-builder/references/components/cds-loader/tokens.md +50 -0
- package/skills/cds-builder/references/components/cds-main/api.md +14 -0
- package/skills/cds-builder/references/components/cds-main/examples.md +60 -0
- package/skills/cds-builder/references/components/cds-menu/api.md +84 -0
- package/skills/cds-builder/references/components/cds-menu/examples.md +595 -0
- package/skills/cds-builder/references/components/cds-menu/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-menu/tokens.md +19 -0
- package/skills/cds-builder/references/components/cds-messages/api.md +29 -0
- package/skills/cds-builder/references/components/cds-messages/examples.md +119 -0
- package/skills/cds-builder/references/components/cds-messages/tokens.md +15 -0
- package/skills/cds-builder/references/components/cds-modal/api.md +86 -0
- package/skills/cds-builder/references/components/cds-modal/examples.md +516 -0
- package/skills/cds-builder/references/components/cds-modal/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-modal/tokens.md +22 -0
- package/skills/cds-builder/references/components/cds-notification/api.md +46 -0
- package/skills/cds-builder/references/components/cds-notification/examples.md +314 -0
- package/skills/cds-builder/references/components/cds-notification/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-notification/tokens.md +23 -0
- package/skills/cds-builder/references/components/cds-notification-alert/api.md +93 -0
- package/skills/cds-builder/references/components/cds-notification-alert/examples.md +202 -0
- package/skills/cds-builder/references/components/cds-notification-alert/tokens.md +15 -0
- package/skills/cds-builder/references/components/cds-otp-input/api.md +106 -0
- package/skills/cds-builder/references/components/cds-otp-input/examples.md +329 -0
- package/skills/cds-builder/references/components/cds-otp-input/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-otp-input/tokens.md +41 -0
- package/skills/cds-builder/references/components/cds-overlay/api.md +85 -0
- package/skills/cds-builder/references/components/cds-overlay/examples.md +409 -0
- package/skills/cds-builder/references/components/cds-overlay/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-overlay/tokens.md +12 -0
- package/skills/cds-builder/references/components/cds-page/api.md +21 -0
- package/skills/cds-builder/references/components/cds-page/examples.md +123 -0
- package/skills/cds-builder/references/components/cds-pagination/api.md +67 -0
- package/skills/cds-builder/references/components/cds-pagination/examples.md +320 -0
- package/skills/cds-builder/references/components/cds-pagination/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-pagination/tokens.md +20 -0
- package/skills/cds-builder/references/components/cds-progress-bar/api.md +53 -0
- package/skills/cds-builder/references/components/cds-progress-bar/examples.md +393 -0
- package/skills/cds-builder/references/components/cds-progress-bar/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-progress-bar/tokens.md +33 -0
- package/skills/cds-builder/references/components/cds-progress-circle/api.md +30 -0
- package/skills/cds-builder/references/components/cds-progress-circle/examples.md +326 -0
- package/skills/cds-builder/references/components/cds-progress-circle/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-progress-circle/tokens.md +31 -0
- package/skills/cds-builder/references/components/cds-radio/api.md +47 -0
- package/skills/cds-builder/references/components/cds-radio/tokens.md +36 -0
- package/skills/cds-builder/references/components/cds-radio-group/api.md +87 -0
- package/skills/cds-builder/references/components/cds-radio-group/examples.md +320 -0
- package/skills/cds-builder/references/components/cds-radio-group/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-radio-group/tokens.md +14 -0
- package/skills/cds-builder/references/components/cds-responsive/api.md +29 -0
- package/skills/cds-builder/references/components/cds-responsive/examples.md +271 -0
- package/skills/cds-builder/references/components/cds-responsive/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-responsive/tokens.md +13 -0
- package/skills/cds-builder/references/components/cds-select/api.md +155 -0
- package/skills/cds-builder/references/components/cds-select/examples.md +794 -0
- package/skills/cds-builder/references/components/cds-select/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-select/tokens.md +17 -0
- package/skills/cds-builder/references/components/cds-selection-control/api.md +60 -0
- package/skills/cds-builder/references/components/cds-selection-control/examples.md +468 -0
- package/skills/cds-builder/references/components/cds-selection-control-group/api.md +45 -0
- package/skills/cds-builder/references/components/cds-selection-control-group/examples.md +349 -0
- package/skills/cds-builder/references/components/cds-skeleton-loader/api.md +30 -0
- package/skills/cds-builder/references/components/cds-skeleton-loader/examples.md +297 -0
- package/skills/cds-builder/references/components/cds-skeleton-loader/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-skeleton-loader/tokens.md +62 -0
- package/skills/cds-builder/references/components/cds-slide-group/api.md +76 -0
- package/skills/cds-builder/references/components/cds-slide-group/examples.md +304 -0
- package/skills/cds-builder/references/components/cds-slide-group/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-slide-group/tokens.md +11 -0
- package/skills/cds-builder/references/components/cds-slide-view/api.md +88 -0
- package/skills/cds-builder/references/components/cds-slide-view/examples.md +311 -0
- package/skills/cds-builder/references/components/cds-slide-view/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-slide-view/tokens.md +14 -0
- package/skills/cds-builder/references/components/cds-stages/api.md +31 -0
- package/skills/cds-builder/references/components/cds-stages/examples.md +230 -0
- package/skills/cds-builder/references/components/cds-stages/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-stages/tokens.md +27 -0
- package/skills/cds-builder/references/components/cds-status/api.md +24 -0
- package/skills/cds-builder/references/components/cds-status/examples.md +170 -0
- package/skills/cds-builder/references/components/cds-status/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-status/tokens.md +17 -0
- package/skills/cds-builder/references/components/cds-steps/api.md +176 -0
- package/skills/cds-builder/references/components/cds-steps/examples.md +320 -0
- package/skills/cds-builder/references/components/cds-steps/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-steps/tokens.md +52 -0
- package/skills/cds-builder/references/components/cds-surface/api.md +30 -0
- package/skills/cds-builder/references/components/cds-surface/examples.md +106 -0
- package/skills/cds-builder/references/components/cds-table/api.md +120 -0
- package/skills/cds-builder/references/components/cds-table/examples.md +3049 -0
- package/skills/cds-builder/references/components/cds-table/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-table/tokens.md +92 -0
- package/skills/cds-builder/references/components/cds-tabs/api.md +179 -0
- package/skills/cds-builder/references/components/cds-tabs/examples.md +610 -0
- package/skills/cds-builder/references/components/cds-tabs/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-tabs/tokens.md +40 -0
- package/skills/cds-builder/references/components/cds-tag/api.md +64 -0
- package/skills/cds-builder/references/components/cds-tag/examples.md +278 -0
- package/skills/cds-builder/references/components/cds-tag/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-tag/tokens.md +67 -0
- package/skills/cds-builder/references/components/cds-tag-group/api.md +58 -0
- package/skills/cds-builder/references/components/cds-tag-group/examples.md +346 -0
- package/skills/cds-builder/references/components/cds-tag-group/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-tag-group/tokens.md +18 -0
- package/skills/cds-builder/references/components/cds-text-area/api.md +113 -0
- package/skills/cds-builder/references/components/cds-text-area/examples.md +327 -0
- package/skills/cds-builder/references/components/cds-text-area/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-text-area/tokens.md +16 -0
- package/skills/cds-builder/references/components/cds-text-input/api.md +115 -0
- package/skills/cds-builder/references/components/cds-text-input/examples.md +546 -0
- package/skills/cds-builder/references/components/cds-text-input/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-text-input/tokens.md +17 -0
- package/skills/cds-builder/references/components/cds-time-picker/api.md +44 -0
- package/skills/cds-builder/references/components/cds-time-picker/examples.md +407 -0
- package/skills/cds-builder/references/components/cds-time-picker/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-time-picker/tokens.md +23 -0
- package/skills/cds-builder/references/components/cds-toast/api.md +97 -0
- package/skills/cds-builder/references/components/cds-toast/examples.md +296 -0
- package/skills/cds-builder/references/components/cds-toast/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-toast/tokens.md +26 -0
- package/skills/cds-builder/references/components/cds-toast-queue/api.md +86 -0
- package/skills/cds-builder/references/components/cds-toast-queue/examples.md +227 -0
- package/skills/cds-builder/references/components/cds-toggle/api.md +97 -0
- package/skills/cds-builder/references/components/cds-toggle/examples.md +335 -0
- package/skills/cds-builder/references/components/cds-toggle/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-toggle/tokens.md +91 -0
- package/skills/cds-builder/references/components/cds-toolbar/api.md +44 -0
- package/skills/cds-builder/references/components/cds-toolbar/examples.md +186 -0
- package/skills/cds-builder/references/components/cds-toolbar/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-toolbar/tokens.md +13 -0
- package/skills/cds-builder/references/components/cds-tooltip/api.md +83 -0
- package/skills/cds-builder/references/components/cds-tooltip/examples.md +321 -0
- package/skills/cds-builder/references/components/cds-tooltip/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-tooltip/tokens.md +25 -0
- package/skills/cds-builder/references/components/cds-tree/api.md +169 -0
- package/skills/cds-builder/references/components/cds-tree/examples.md +785 -0
- package/skills/cds-builder/references/components/cds-tree/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-tree/tokens.md +39 -0
- package/skills/cds-builder/references/components/cds-uploader/api.md +105 -0
- package/skills/cds-builder/references/components/cds-uploader/examples.md +553 -0
- package/skills/cds-builder/references/components/cds-uploader/guidelines.md +10 -0
- package/skills/cds-builder/references/components/cds-uploader/tokens.md +26 -0
- package/skills/cds-builder/references/components/cds-virtual-scroll/api.md +60 -0
- package/skills/cds-builder/references/components/cds-virtual-scroll/examples.md +272 -0
- package/skills/cds-builder/references/components/cds-virtual-scroll/guidelines.md +9 -0
- package/skills/cds-builder/references/components/cds-virtual-scroll/tokens.md +13 -0
- package/skills/cds-builder/references/guides/conventions.md +48 -0
- package/skills/cds-builder/references/guides/date-utils.md +301 -0
- package/skills/cds-builder/references/guides/display-and-platform.md +263 -0
- package/skills/cds-builder/references/guides/forms.md +77 -0
- package/skills/cds-builder/references/guides/global-configuration.md +354 -0
- package/skills/cds-builder/references/guides/icons.md +172 -0
- package/skills/cds-builder/references/guides/internationalization.md +470 -0
- package/skills/cds-builder/references/guides/migration-cds3-to-cds4.md +49 -0
- package/skills/cds-builder/references/guides/sass-variables.md +238 -0
- package/skills/cds-builder/references/guides/setup.md +81 -0
- package/skills/cds-builder/references/guides/tailwindcss.md +93 -0
- package/skills/cds-builder/references/guides/theme.md +343 -0
- package/skills/cds-builder/references/guides/treeshaking.md +237 -0
- package/skills/cds-builder/references/patterns/dialogs.md +89 -0
- package/skills/cds-builder/references/patterns/forms.md +101 -0
- package/skills/cds-builder/references/patterns/page-layout.md +78 -0
- package/skills/cds-builder/references/patterns/tables.md +87 -0
- package/skills/cds-builder/references/tokens/colors.md +507 -0
- package/skills/cds-builder/references/tokens/themes.md +981 -0
- package/skills/cds-builder/scripts/check-contracts.mjs +264 -0
- package/skills/cds-migrate/GENERATION.md +44 -0
- package/skills/cds-migrate/SKILL.md +160 -0
- package/skills/cds-migrate/references/migration-full.md +2225 -0
- package/skills/cds-refactor/GENERATION.md +44 -0
- package/skills/cds-refactor/SKILL.md +187 -0
- package/skills/cds-refactor/references/html-to-cds.md +80 -0
- package/skills/cds-refactor/references/review-checklist.md +73 -0
- package/skills/cds-refactor/references/tailwind-to-cds.md +65 -0
|
@@ -0,0 +1,310 @@
|
|
|
1
|
+
# CDS 4 component decision tree
|
|
2
|
+
|
|
3
|
+
> Generated from component documentation pages by `bun run generate:skill`. Do not edit manually.
|
|
4
|
+
> Handwritten head-to-head cases are at the end of the file.
|
|
5
|
+
|
|
6
|
+
Selection rules:
|
|
7
|
+
|
|
8
|
+
1. **Pick the narrowest component that fits.** If `CdsSelect` exists, don't
|
|
9
|
+
hand-build a dropdown out of `CdsSurface` and `CdsList`.
|
|
10
|
+
2. **Don't invent a component that doesn't exist.** Check the list below: if the
|
|
11
|
+
task isn't covered, assemble it from existing atoms and tell the user.
|
|
12
|
+
3. **Check the contract.** Once you pick a component, open its `api.md` and use
|
|
13
|
+
the real props, not guesses.
|
|
14
|
+
4. The "See also" line points to a neighboring component for when the chosen one
|
|
15
|
+
doesn't fit.
|
|
16
|
+
|
|
17
|
+
## Atoms (15)
|
|
18
|
+
|
|
19
|
+
- **CdsCounter** — The counter shows how many characters are already typed and how many are allowed: `42 / 100`. [api](components/cds-counter/api.md) · [examples](components/cds-counter/examples.md)
|
|
20
|
+
- See also: The ready-made fields already have the counter built in — turn on the `counter` prop of [CdsTextInput](components/cds-text-input/api.md) or [CdsTextArea](components/cds-text-area/api.md). A standalone `CdsCounter` is needed when you build your own control.
|
|
21
|
+
- **CdsDescription** — A description is muted text under the label of a field. [api](components/cds-description/api.md) · [examples](components/cds-description/examples.md)
|
|
22
|
+
- See also: Inputs already have the description built in — the `description` prop of [CdsTextInput](components/cds-text-input/api.md) and the other controls. A standalone `CdsDescription` is needed for groups of fields and for your own controls. For the label of a field take [CdsLabel](components/cds-label/api.md), for the messages under a field take [CdsMessages](components/cds-messages/api.md).
|
|
23
|
+
- **CdsDivider** — A divider is a thin line between the meaningful parts of an interface: the sections of a form, the rows of a list, the blocks of a card. [api](components/cds-divider/api.md) · [examples](components/cds-divider/examples.md) · [guidelines](components/cds-divider/guidelines.md)
|
|
24
|
+
- See also: The blocks of a card are separated by the `divider` prop of [CdsCard](components/cds-card/api.md) — it draws the same line without adding markup. If the parts of the screen need to be moved onto different surfaces rather than separated, take [CdsSurface](components/cds-surface/api.md).
|
|
25
|
+
- **CdsField** — The frame of an input: the background, the border, the focus and error states, the inner icons, the clear button and the loading indicator. [api](components/cds-field/api.md) · [examples](components/cds-field/examples.md)
|
|
26
|
+
- See also: For regular input take the ready-made fields — [CdsTextInput](components/cds-text-input/api.md), [CdsSelect](components/cds-select/api.md), [CdsTextArea](components/cds-text-area/api.md). `CdsField` is needed when your control is not in the library. The label, the description and the messages around the frame are added by [CdsInput](components/cds-input/api.md).
|
|
27
|
+
- **CdsFunctionalButton** — A functional button is a utility action next to the content: download a file in a row of a list, reveal a password in a field, collapse a block, open the menu of a record. [api](components/cds-functional-button/api.md) · [examples](components/cds-functional-button/examples.md) · [guidelines](components/cds-functional-button/guidelines.md)
|
|
28
|
+
- See also: Style the primary action of the screen — "Save", "Submit the request" — with [CdsButton](components/cds-button/api.md), and a navigation inside a paragraph with [CdsLink](components/cds-link/api.md). If the icon triggers nothing and only explains the content, leave it as [CdsIcon](components/cds-icon/api.md).
|
|
29
|
+
- **CdsHighlight** — Highlighting explains why a row made it into the results: the component finds the matches with the query (`query`) or with ready ranges (`matches`) in the text and wraps them into `mark`. [api](components/cds-highlight/api.md) · [examples](components/cds-highlight/examples.md) · [guidelines](components/cds-highlight/guidelines.md)
|
|
30
|
+
- See also: In [CdsAutocomplete](components/cds-autocomplete/api.md), [CdsCombobox](components/cds-combobox/api.md) and [CdsSelect](components/cds-select/api.md) the highlighting of the matches is already built in — a standalone `CdsHighlight` is not needed there. For a permanent label next to the text take [CdsTag](components/cds-tag/api.md), for a counter take [CdsBadge](components/cds-badge/api.md).
|
|
31
|
+
- **CdsInput** — The wrapper of an input: the label, the description, the outer icons, the block of messages and the validation by rules. [api](components/cds-input/api.md) · [examples](components/cds-input/examples.md)
|
|
32
|
+
- See also: For regular input take the ready-made fields — [CdsTextInput](components/cds-text-input/api.md), [CdsSelect](components/cds-select/api.md), [CdsTextArea](components/cds-text-area/api.md): they are already assembled from `CdsInput` and `CdsField`. `CdsInput` is needed when your control is not in the library.
|
|
33
|
+
- **CdsLabel** — A label names a field — it says what is expected from the user. [api](components/cds-label/api.md) · [examples](components/cds-label/examples.md)
|
|
34
|
+
- See also: The ready-made fields already have the label built in — the `label` prop of [CdsTextInput](components/cds-text-input/api.md) and the other controls. A standalone `CdsLabel` is needed for groups of fields and for your own controls. The explanation under the label is added by [CdsDescription](components/cds-description/api.md).
|
|
35
|
+
- **CdsMessages** — The block of messages under an input: a hint, an explanation or a validation error. [api](components/cds-messages/api.md) · [examples](components/cds-messages/examples.md)
|
|
36
|
+
- See also: The ready-made fields already have the block of messages built in — the `messages`, `hint` and `error-messages` props of [CdsTextInput](components/cds-text-input/api.md) and the other controls. A standalone `CdsMessages` is needed for groups of fields and for your own controls. For a noticeable notification on the page take [CdsNotification](components/cds-notification/api.md).
|
|
37
|
+
- **CdsResponsive** — A frame with constant proportions. [api](components/cds-responsive/api.md) · [examples](components/cds-responsive/examples.md) · [guidelines](components/cds-responsive/guidelines.md)
|
|
38
|
+
- See also: For photos take [CdsImage](components/cds-image/api.md) — it is built on `CdsResponsive` and can also do lazy loading, a placeholder and cropping. If you need the columns of a page rather than the shape of a single block, take [CdsGrid](components/cds-grid/api.md).
|
|
39
|
+
- **CdsSelectionControl** — The base of the selection controls: a native `input` with state icons, a label and a description. [api](components/cds-selection-control/api.md) · [examples](components/cds-selection-control/examples.md)
|
|
40
|
+
- See also: For regular selection take the ready-made controls — [CdsCheckbox](components/cds-checkbox/api.md), [CdsRadio](components/cds-radio/api.md), [CdsToggle](components/cds-toggle/api.md): they already have the icons, the sizes, the state colors and the block of messages. `CdsSelectionControl` is needed when the control you want is not in the library.
|
|
41
|
+
- **CdsSelectionControlGroup** — A container for a set of selection controls: it holds the shared value, hands the nested [CdsSelectionControl](components/cds-selection-control/api.md) the type, the icons, the colors and the states, and ties them together with a single `name` attribute. [api](components/cds-selection-control-group/api.md) · [examples](components/cds-selection-control-group/examples.md)
|
|
42
|
+
- See also: For a ready group with a title, a description and messages take [CdsRadioGroup](components/cds-radio-group/api.md): it is assembled from this group and the [CdsInput](components/cds-input/api.md) wrapper. `CdsSelectionControlGroup` is needed when you build your own set of controls.
|
|
43
|
+
- **CdsSlideGroup** — A slide group lays a set of elements out in a single scrollable line: when the elements do not fit, the strip is paged with arrows. [api](components/cds-slide-group/api.md) · [examples](components/cds-slide-group/examples.md) · [guidelines](components/cds-slide-group/guidelines.md)
|
|
44
|
+
- See also: For a bar of sections take the ready [CdsTabs](components/cds-tabs/api.md), for picking tags take [CdsTagGroup](components/cds-tag-group/api.md), and to page through slides one by one take [CdsSlideView](components/cds-slide-view/api.md).
|
|
45
|
+
- **CdsSlideView** — A slide view shows one slide out of a set and switches them with a shift animation: arrows, swipes and `v-model` page forward and backward. [api](components/cds-slide-view/api.md) · [examples](components/cds-slide-view/examples.md) · [guidelines](components/cds-slide-view/guidelines.md)
|
|
46
|
+
- See also: For a carousel of images with dot delimiters and autoplay take the ready [CdsCarousel](components/cds-carousel/api.md), for sections with a navigation bar take [CdsTabs](components/cds-tabs/api.md), and for a strip where several elements are visible at once take [CdsSlideGroup](components/cds-slide-group/api.md).
|
|
47
|
+
- **CdsSurface** — A surface is a container with a background from the tokens, sizes, positioning and a theme of its own. [api](components/cds-surface/api.md) · [examples](components/cds-surface/examples.md)
|
|
48
|
+
- See also: For a card with a title and actions take [CdsCard](components/cds-card/api.md), for the sections of a page take [CdsLayout](components/cds-layout/api.md). `CdsSurface` is the lowest layer, without content or paddings of its own.
|
|
49
|
+
|
|
50
|
+
## Content (19)
|
|
51
|
+
|
|
52
|
+
- **CdsAvatar** — An avatar shows a person, a team or a company: a photo, initials or an icon inside a round container. [api](components/cds-avatar/api.md) · [examples](components/cds-avatar/examples.md) · [guidelines](components/cds-avatar/guidelines.md)
|
|
53
|
+
- See also: The built-in badge shows a status or a counter right on the avatar; for a marker on arbitrary content take [CdsBadge](components/cds-badge/api.md), and for a text label inside a line — [CdsTag](components/cds-tag/api.md).
|
|
54
|
+
- **CdsButton** — A button is the primary way to trigger an action: submit a form, open a modal, confirm a choice. [api](components/cds-button/api.md) · [examples](components/cds-button/examples.md) · [guidelines](components/cds-button/guidelines.md)
|
|
55
|
+
- See also: For a link styled as text inside a paragraph, use [CdsLink](components/cds-link/api.md); to pick one option out of several, use [CdsButtonToggle](components/cds-button-toggle/api.md).
|
|
56
|
+
- **CdsButtonGroup** — A button group joins several [CdsButton](components/cds-button/api.md) into one block: the buttons sit flush against each other, only the outer corners stay rounded, and shared props are set once on the group. [api](components/cds-button-group/api.md) · [examples](components/cds-button-group/examples.md)
|
|
57
|
+
- See also: If the user does not trigger an action but picks one of several options, use [CdsButtonToggle](components/cds-button-toggle/api.md) — it keeps the selected state.
|
|
58
|
+
- **CdsButtonToggle** — A toggle group turns [CdsButton](components/cds-button/api.md) into a switch: the pressed button stays selected, and the choice is available through `v-model`. [api](components/cds-button-toggle/api.md) · [examples](components/cds-button-toggle/examples.md) · [guidelines](components/cds-button-toggle/guidelines.md)
|
|
59
|
+
- See also: If the buttons trigger actions instead of storing a choice, take [CdsButtonGroup](components/cds-button-group/api.md). To pick from a long list use [CdsSelect](components/cds-select/api.md), and inside forms — [CdsRadioGroup](components/cds-radio-group/api.md).
|
|
60
|
+
- **CdsCard** — A card gathers related content — a title, text, an image, actions — into one bordered block. [api](components/cds-card/api.md) · [examples](components/cds-card/examples.md) · [guidelines](components/cds-card/guidelines.md)
|
|
61
|
+
- See also: For uniform lists of rows use [CdsList](components/cds-list/api.md), for collapsible sections use [CdsExpandablePanel](components/cds-expandable-panel/api.md), and when you only need a surface without any structure, use [CdsSurface](components/cds-surface/api.md).
|
|
62
|
+
- **CdsCarousel** — A carousel shows images or arbitrary content slide by slide: promo banners, photo galleries, onboarding steps. [api](components/cds-carousel/api.md) · [examples](components/cds-carousel/examples.md) · [guidelines](components/cds-carousel/guidelines.md)
|
|
63
|
+
- See also: To switch content without delimiters and autoplay, take [CdsSlideView](components/cds-slide-view/api.md) — the carousel is built on top of it; for a single image take [CdsImage](components/cds-image/api.md).
|
|
64
|
+
- **CdsExpandablePanel** — An expandable panel hides the details behind a title: you see the list of topics and open only the one you need. [api](components/cds-expandable-panel/api.md) · [examples](components/cds-expandable-panel/examples.md) · [guidelines](components/cds-expandable-panel/guidelines.md)
|
|
65
|
+
- See also: If the sections are equal in weight and the reader switches between them, take [CdsTabs](components/cds-tabs/api.md). For a hierarchy of nested nodes take [CdsTree](components/cds-tree/api.md), and for a block that simply separates content — [CdsCard](components/cds-card/api.md).
|
|
66
|
+
- **CdsIcon** — An icon is a short visual mark next to the text: the status of a record, the type of a file, the direction of a transition. [api](components/cds-icon/api.md) · [examples](components/cds-icon/examples.md) · [guidelines](components/cds-icon/guidelines.md)
|
|
67
|
+
- See also: Inside other components you do not assemble an icon separately: [CdsButton](components/cds-button/api.md), [CdsTextInput](components/cds-text-input/api.md), [CdsList](components/cds-list/api.md) and others have the `icon`, `prepend-icon` and `append-icon` props. For a standalone action take [CdsFunctionalButton](components/cds-functional-button/api.md) — an icon button with a label and states. All the available icons are in the gallery, and connecting your own pack is described in the [guide](guides/icons.md).
|
|
68
|
+
- **CdsImage** — An image that knows how to wait. [api](components/cds-image/api.md) · [examples](components/cds-image/examples.md) · [guidelines](components/cds-image/guidelines.md)
|
|
69
|
+
- See also: For a photo of a person or a company logo in a round frame take [CdsAvatar](components/cds-avatar/api.md), for interface pictograms — [CdsIcon](components/cds-icon/api.md). If the proportions have to be set not for a picture but for an arbitrary block — a video, a map, an iframe — use [CdsResponsive](components/cds-responsive/api.md), and a slideshow of several images is assembled by [CdsCarousel](components/cds-carousel/api.md).
|
|
70
|
+
- **CdsList** — A list shows a set of records of the same kind — menu sections, documents, employees, settings — so that the one you need is easy to find and pick. [api](components/cds-list/api.md) · [examples](components/cds-list/examples.md) · [guidelines](components/cds-list/guidelines.md)
|
|
71
|
+
- See also: To pick a value in a form, take [CdsSelect](components/cds-select/api.md); for a tree with checkboxes, async loading and drag and drop — [CdsTree](components/cds-tree/api.md); for tabular data with columns — [CdsTable](components/cds-table/api.md). Inside [CdsMenu](components/cds-menu/api.md), [CdsSelect](components/cds-select/api.md) and [CdsAutocomplete](components/cds-autocomplete/api.md) the list is already in use — there is no need to assemble it by hand.
|
|
72
|
+
- **CdsMenu** — A menu pops up next to an activator element and shows a list of actions or sections: the "more" button in a table row, the user menu in the header, a context menu on right click. [api](components/cds-menu/api.md) · [examples](components/cds-menu/examples.md) · [guidelines](components/cds-menu/guidelines.md)
|
|
73
|
+
- See also: To pick a value in a form, take [CdsSelect](components/cds-select/api.md) — it stays visible and gets submitted. For a short hint on hover use [CdsTooltip](components/cds-tooltip/api.md), and for a dialog that demands an answer use [CdsModal](components/cds-modal/api.md). The content of a menu is usually built from [CdsList](components/cds-list/api.md).
|
|
74
|
+
- **CdsModal** — A modal opens on top of the page and keeps the focus on a single task: confirm an action, fill in a short form, look at the details — without taking you away from the current screen. [api](components/cds-modal/api.md) · [examples](components/cds-modal/examples.md) · [guidelines](components/cds-modal/guidelines.md)
|
|
75
|
+
- See also: For a list of actions on an element take [CdsMenu](components/cds-menu/api.md), for a short hint — [CdsTooltip](components/cds-tooltip/api.md), for a notification about the result — [CdsToast](components/cds-toast/api.md). Complex modal content — a header, scrollable text and a row of buttons — is assembled from [CdsCard](components/cds-card/api.md).
|
|
76
|
+
- **CdsOverlay** — An overlay shows content on top of the page: it dims the page with a scrim, computes the position relative to an activator and manages the stacking order of the open layers. [api](components/cds-overlay/api.md) · [examples](components/cds-overlay/examples.md) · [guidelines](components/cds-overlay/guidelines.md)
|
|
77
|
+
- See also: For common tasks there are ready-made components built on the overlay: a dialog — [CdsModal](components/cds-modal/api.md), a list of actions next to an activator — [CdsMenu](components/cds-menu/api.md), a hint on hover — [CdsTooltip](components/cds-tooltip/api.md), notifications — [CdsToast](components/cds-toast/api.md). CdsOverlay is for when none of them fits.
|
|
78
|
+
- **CdsTable** — A table shows large sets of records in columns and takes the data work off your hands: sorting, filters, pagination, row selection and expansion, a pinned header and pinned columns. [api](components/cds-table/api.md) · [examples](components/cds-table/examples.md) · [guidelines](components/cds-table/guidelines.md)
|
|
79
|
+
- See also: For a plain list of similar items without columns, use [CdsList](components/cds-list/api.md); for a hierarchy without tabular data, use [CdsTree](components/cds-tree/api.md).
|
|
80
|
+
- **CdsTag** — A tag is a compact label next to an object: the status of a request, a product category, a selected filter. [api](components/cds-tag/api.md) · [examples](components/cds-tag/examples.md) · [guidelines](components/cds-tag/guidelines.md)
|
|
81
|
+
- See also: To build a toggle or a filter with selection out of tags, take [CdsTagGroup](components/cds-tag-group/api.md). For a counter or a dot indicator on top of another element use [CdsBadge](components/cds-badge/api.md), and trigger actions with [CdsButton](components/cds-button/api.md) — a tag only labels.
|
|
82
|
+
- **CdsTagGroup** — A tag group turns a set of [CdsTag](components/cds-tag/api.md) into a toggle: the selected tag is highlighted, the value is available through `v-model`, and the tags that do not fit move into a horizontal scroll. [api](components/cds-tag-group/api.md) · [examples](components/cds-tag-group/examples.md) · [guidelines](components/cds-tag-group/guidelines.md)
|
|
83
|
+
- See also: If the choice should look like buttons, take [CdsButtonToggle](components/cds-button-toggle/api.md). For a choice out of a long list use [CdsSelect](components/cds-select/api.md), and for separate independent tags without selection just use [CdsTag](components/cds-tag/api.md).
|
|
84
|
+
- **CdsTooltip** — A tooltip briefly explains an interface element on hover or focus: it names an icon button, shows the full text of a truncated line, explains why an action is unavailable. [api](components/cds-tooltip/api.md) · [examples](components/cds-tooltip/examples.md) · [guidelines](components/cds-tooltip/guidelines.md)
|
|
85
|
+
- See also: A tooltip is for a short text without interaction. A list of actions on click is the job of [CdsMenu](components/cds-menu/api.md), and a dialog with a form and buttons is the job of [CdsModal](components/cds-modal/api.md).
|
|
86
|
+
- **CdsTree** — A tree shows a hierarchy: catalog sections, project files, an org structure. [api](components/cds-tree/api.md) · [examples](components/cds-tree/examples.md) · [guidelines](components/cds-tree/guidelines.md)
|
|
87
|
+
- See also: For a flat set without nesting take [CdsList](components/cds-list/api.md), for navigation between sections take [CdsMenu](components/cds-menu/api.md), and for collapsible sections of content take [CdsExpandablePanel](components/cds-expandable-panel/api.md).
|
|
88
|
+
- **CdsVirtualScroll** — Virtual scrolling keeps long lists fast: only the visible rows get into the DOM, not the whole array. [api](components/cds-virtual-scroll/api.md) · [examples](components/cds-virtual-scroll/examples.md) · [guidelines](components/cds-virtual-scroll/guidelines.md)
|
|
89
|
+
- See also: The dropdowns of [CdsSelect](components/cds-select/api.md) and [CdsAutocomplete](components/cds-autocomplete/api.md), as well as the [CdsTree](components/cds-tree/api.md) tree, already virtualize their items — there is no need to wrap them. Render a short list — up to a couple of hundred rows — with the regular [CdsList](components/cds-list/api.md): virtualization will not pay off there.
|
|
90
|
+
|
|
91
|
+
## Controls (18)
|
|
92
|
+
|
|
93
|
+
- **CdsAutocomplete** — An autocomplete is a field for picking from a long list: the user types a query, the list is filtered on the fly and the matches are highlighted. [api](components/cds-autocomplete/api.md) · [examples](components/cds-autocomplete/examples.md) · [guidelines](components/cds-autocomplete/guidelines.md)
|
|
94
|
+
- See also: If there are few options and search is not needed, take [CdsSelect](components/cds-select/api.md). If the user may enter values outside the list — [CdsCombobox](components/cds-combobox/api.md).
|
|
95
|
+
- **CdsCheckbox** — A checkbox turns an independent option on and off: consent to terms, an entry in a filter list, a profile setting. [api](components/cds-checkbox/api.md) · [examples](components/cds-checkbox/examples.md) · [guidelines](components/cds-checkbox/guidelines.md)
|
|
96
|
+
- See also: To pick one option out of several use [CdsRadio](components/cds-radio/api.md), for settings that apply immediately — [CdsToggle](components/cds-toggle/api.md). If you need the control alone, without a label and messages — in a table cell, for example — take [CdsCheckboxButton](components/cds-checkbox-button/api.md).
|
|
97
|
+
- **CdsCheckboxButton** — The checkbox control without a label and a messages block — the atom [CdsCheckbox](components/cds-checkbox/api.md) is built on. [api](components/cds-checkbox-button/api.md) · [examples](components/cds-checkbox-button/examples.md)
|
|
98
|
+
- See also: For a standalone option with a label, a description and validation use [CdsCheckbox](components/cds-checkbox/api.md) — states, colors and groups work the same way here and are described in detail on its page.
|
|
99
|
+
- **CdsCombobox** — A combobox is a field with a dropdown list and free input: the value can be picked from the offered ones or typed in — the text itself becomes the value. [api](components/cds-combobox/api.md) · [examples](components/cds-combobox/examples.md) · [guidelines](components/cds-combobox/guidelines.md)
|
|
100
|
+
- See also: If the value must come from the list only, take [CdsAutocomplete](components/cds-autocomplete/api.md). If there are few options and free input is not needed — [CdsSelect](components/cds-select/api.md).
|
|
101
|
+
- **CdsDateInput** — A date field: a text field with a calendar icon that opens [CdsDatePicker](components/cds-date-picker/api.md) in a dropdown menu on click. [api](components/cds-date-input/api.md) · [examples](components/cds-date-input/examples.md) · [guidelines](components/cds-date-input/guidelines.md)
|
|
102
|
+
- See also: If the calendar is needed right on the page, without a field, take [CdsDatePicker](components/cds-date-picker/api.md). For the time alone — [CdsTimePicker](components/cds-time-picker/api.md), to pick from a ready list — [CdsSelect](components/cds-select/api.md).
|
|
103
|
+
- **CdsDatePicker** — A calendar for picking a date — a single one, several or a range. [api](components/cds-date-picker/api.md) · [examples](components/cds-date-picker/examples.md) · [guidelines](components/cds-date-picker/guidelines.md)
|
|
104
|
+
- See also: If the calendar needs a field, take the ready [CdsDateInput](components/cds-date-input/api.md) — it assembles the very same thing out of a field, a menu and this calendar, adding manual input and time. For picking the time alone there is [CdsTimePicker](components/cds-time-picker/api.md).
|
|
105
|
+
- **CdsFileInput** — A file field: the user attaches documents by a click, by dragging or by pasting from the clipboard. [api](components/cds-file-input/api.md) · [examples](components/cds-file-input/examples.md) · [guidelines](components/cds-file-input/guidelines.md)
|
|
106
|
+
- See also: If you need a prominent upload zone with a list of files, take [CdsFileUpload](components/cds-file-upload/api.md); sending the files to the server is the job of [CdsUploader](components/cds-uploader/api.md).
|
|
107
|
+
- **CdsFileUpload** — A file upload zone: it accepts files by dragging, by pasting from the clipboard and through the system dialog, and shows the selection as a list with image previews. [api](components/cds-file-upload/api.md) · [examples](components/cds-file-upload/examples.md) · [guidelines](components/cds-file-upload/guidelines.md)
|
|
108
|
+
- See also: For a compact file field in a form row use [CdsFileInput](components/cds-file-input/api.md); sending the files to the server is the job of [CdsUploader](components/cds-uploader/api.md).
|
|
109
|
+
- **CdsForm** — A form joins fields into one group: it collects their validation into a common status, intercepts the submission and can reset the values. [api](components/cds-form/api.md) · [examples](components/cds-form/examples.md) · [guidelines](components/cds-form/guidelines.md)
|
|
110
|
+
- See also: The form does not render the fields itself — build them out of [CdsTextInput](components/cds-text-input/api.md), [CdsSelect](components/cds-select/api.md), [CdsCheckbox](components/cds-checkbox/api.md) and other controls. The validation rules are declared on the fields themselves through the `rules` prop.
|
|
111
|
+
- **CdsOtpInput** — A field for entering a one-time code — from an SMS, an email or an authenticator app. [api](components/cds-otp-input/api.md) · [examples](components/cds-otp-input/examples.md) · [guidelines](components/cds-otp-input/guidelines.md)
|
|
112
|
+
- See also: For an ordinary short text or number take [CdsTextInput](components/cds-text-input/api.md): `CdsOtpInput` is needed where the length of the input is known upfront and every character is shown in its own cell.
|
|
113
|
+
- **CdsRadio** — A radio button is one option of a mutually exclusive choice. [api](components/cds-radio/api.md)
|
|
114
|
+
- See also: Examples, guidelines and scenarios are on the [CdsRadioGroup](components/cds-radio-group/api.md) page. For an independent on/off option take [CdsCheckbox](components/cds-checkbox/api.md).
|
|
115
|
+
- **CdsRadioGroup** — A radio group is a choice of one option out of a short mutually exclusive set: a payment method, a plan, a report period. [api](components/cds-radio-group/api.md) · [examples](components/cds-radio-group/examples.md) · [guidelines](components/cds-radio-group/guidelines.md)
|
|
116
|
+
- See also: For independent options that are turned on separately use [CdsCheckbox](components/cds-checkbox/api.md), for an on/off setting that applies immediately — [CdsToggle](components/cds-toggle/api.md). If there are more than five options, fold the list into [CdsSelect](components/cds-select/api.md).
|
|
117
|
+
- **CdsSelect** — A select opens a dropdown list and lets you pick one or several values from a known set: a country, a status, a category. [api](components/cds-select/api.md) · [examples](components/cds-select/examples.md) · [guidelines](components/cds-select/guidelines.md)
|
|
118
|
+
- See also: For two or three options take [CdsRadioGroup](components/cds-radio-group/api.md) — the options are visible right away. If the list is long and the user searches by typing, use [CdsAutocomplete](components/cds-autocomplete/api.md), and if values outside the list are allowed — [CdsCombobox](components/cds-combobox/api.md).
|
|
119
|
+
- **CdsTextArea** — A text area is a field for multiline text: a comment, a description, a support request. [api](components/cds-text-area/api.md) · [examples](components/cds-text-area/examples.md) · [guidelines](components/cds-text-area/guidelines.md)
|
|
120
|
+
- See also: For a short single-line value use [CdsTextInput](components/cds-text-input/api.md), to pick from a ready list of options — [CdsSelect](components/cds-select/api.md).
|
|
121
|
+
- **CdsTextInput** — A text field is the basic way to get data from the user: a name, an email, an amount, a search query. [api](components/cds-text-input/api.md) · [examples](components/cds-text-input/examples.md) · [guidelines](components/cds-text-input/guidelines.md)
|
|
122
|
+
- See also: For multiline text use [CdsTextArea](components/cds-text-area/api.md), to pick from a ready list of options use [CdsSelect](components/cds-select/api.md).
|
|
123
|
+
- **CdsTimePicker** — Time selection: hours, minutes and — if you want — seconds. [api](components/cds-time-picker/api.md) · [examples](components/cds-time-picker/examples.md) · [guidelines](components/cds-time-picker/guidelines.md)
|
|
124
|
+
- See also: To pick a date use [CdsDatePicker](components/cds-date-picker/api.md), and if you need a field with a date and a time at once — the ready [CdsDateInput](components/cds-date-input/api.md) with the `with-time` prop: it puts this clock under the calendar and brings everything together into one string itself.
|
|
125
|
+
- **CdsToggle** — A toggle is an on/off switch for a setting that applies immediately, without a "Save" button: notifications, auto-renewal, profile visibility. [api](components/cds-toggle/api.md) · [examples](components/cds-toggle/examples.md) · [guidelines](components/cds-toggle/guidelines.md)
|
|
126
|
+
- See also: A toggle changes the setting instantly. If the choice is applied together with the rest of the form by a button, take [CdsCheckbox](components/cds-checkbox/api.md), and to pick one option out of a set — [CdsRadioGroup](components/cds-radio-group/api.md).
|
|
127
|
+
- **CdsUploader** — The uploader sends files to the server right from the interface: the user picks them in the system dialog or drags them onto the button, and the component shows the list of what was uploaded — with a status, progress, downloading and removal. [api](components/cds-uploader/api.md) · [examples](components/cds-uploader/examples.md) · [guidelines](components/cds-uploader/guidelines.md)
|
|
128
|
+
- See also: The uploader sends the files over HTTP itself. If the files only have to be picked and sent together with the form, take the [CdsFileInput](components/cds-file-input/api.md) field, and for a drop zone with image previews — [CdsFileUpload](components/cds-file-upload/api.md).
|
|
129
|
+
|
|
130
|
+
## Feedback (12)
|
|
131
|
+
|
|
132
|
+
- **CdsBadge** — A badge is a small marker in the corner of an element or next to it: a counter of unread messages, a "there is something new" dot, a short label. [api](components/cds-badge/api.md) · [examples](components/cds-badge/examples.md) · [guidelines](components/cds-badge/guidelines.md)
|
|
133
|
+
- See also: For a textual object status ("Done", "In progress") take [CdsStatus](components/cds-status/api.md), and [CdsAvatar](components/cds-avatar/api.md) has a built-in `badge` prop for the common indicators on an avatar.
|
|
134
|
+
- **CdsEmptyState** — An empty state explains why there is no content on the screen and suggests the next step: no search results, an empty list, a loading error. [api](components/cds-empty-state/api.md) · [examples](components/cds-empty-state/examples.md) · [guidelines](components/cds-empty-state/guidelines.md)
|
|
135
|
+
- See also: For a short message about the result of an operation take [CdsToast](components/cds-toast/api.md), and while the data is still loading show [CdsSkeletonLoader](components/cds-skeleton-loader/api.md) instead of an empty state.
|
|
136
|
+
- **CdsLoader** — A circular indeterminate loading indicator — a spinning ring without progress. [api](components/cds-loader/api.md) · [examples](components/cds-loader/examples.md)
|
|
137
|
+
- See also: The component is deprecated and will be removed in future versions. Use [CdsProgressCircle](components/cds-progress-circle/api.md): it covers both indeterminate loading and progress.
|
|
138
|
+
- **CdsNotification** — A notification is a block with a message about an event or a state: a successful save, a warning about a limit, a loading error. [api](components/cds-notification/api.md) · [examples](components/cds-notification/examples.md) · [guidelines](components/cds-notification/guidelines.md)
|
|
139
|
+
- See also: For pop-up messages above the page that disappear on their own take [CdsToast](components/cds-toast/api.md). For a short status label in a row or a card — [CdsTag](components/cds-tag/api.md).
|
|
140
|
+
- **CdsNotificationAlert** — A pop-up notification above the page — the counterpart of `CdsNotificationAlert` from CDS 3. [api](components/cds-notification-alert/api.md) · [examples](components/cds-notification-alert/examples.md)
|
|
141
|
+
- See also: The component exists only for a smooth migration from CDS 3 and will be removed. For new scenarios use [CdsToast](components/cds-toast/api.md).
|
|
142
|
+
- **CdsProgressBar** — A linear progress indicator — a horizontal bar for the course of an operation: a file upload, the steps of a wizard, media playback. [api](components/cds-progress-bar/api.md) · [examples](components/cds-progress-bar/examples.md) · [guidelines](components/cds-progress-bar/guidelines.md)
|
|
143
|
+
- See also: For progress shown as a ring take [CdsProgressCircle](components/cds-progress-circle/api.md), and to dim a container while it loads — [CdsOverlay](components/cds-overlay/api.md).
|
|
144
|
+
- **CdsProgressCircle** — A circular progress indicator shows the course of an operation: a file upload, data processing, a filling quota. [api](components/cds-progress-circle/api.md) · [examples](components/cds-progress-circle/examples.md) · [guidelines](components/cds-progress-circle/guidelines.md)
|
|
145
|
+
- See also: For progress shown as a horizontal bar take [CdsProgressBar](components/cds-progress-bar/api.md), and to dim a container while it loads — [CdsOverlay](components/cds-overlay/api.md).
|
|
146
|
+
- **CdsSkeletonLoader** — A skeleton shows the shape of the future content while the data is loading: instead of an empty screen the user immediately sees where the heading, the text and the buttons will appear. [api](components/cds-skeleton-loader/api.md) · [examples](components/cds-skeleton-loader/examples.md) · [guidelines](components/cds-skeleton-loader/guidelines.md)
|
|
147
|
+
- See also: A skeleton fits the first load of a block or a page. For waiting inside a single action — submitting a form, saving — take the `loading` prop of [CdsButton](components/cds-button/api.md) or [CdsProgressCircle](components/cds-progress-circle/api.md). If there is no data at all, show [CdsEmptyState](components/cds-empty-state/api.md).
|
|
148
|
+
- **CdsStages** — A stage bar shows the course of a business process: which stages are behind, which one is running now and where the process stopped because of an error. [api](components/cds-stages/api.md) · [examples](components/cds-stages/examples.md) · [guidelines](components/cds-stages/guidelines.md)
|
|
149
|
+
- See also: To walk the user through steps with content and "Back" / "Next" buttons take [CdsSteps](components/cds-steps/api.md), and to switch between equally weighted sections — [CdsTabs](components/cds-tabs/api.md).
|
|
150
|
+
- **CdsStatus** — A status is a non-interactive indicator of the state of an object: the request is paid, the document is under review, the payment is overdue. [api](components/cds-status/api.md) · [examples](components/cds-status/examples.md) · [guidelines](components/cds-status/guidelines.md)
|
|
151
|
+
- See also: For labels with arbitrary palette colors — categories, filters — take [CdsTag](components/cds-tag/api.md); for counters and marker dots in the corner of an element — [CdsBadge](components/cds-badge/api.md).
|
|
152
|
+
- **CdsToast** — A toast is a pop-up notification about the result of an action: the changes are saved, the file is uploaded, the request failed. [api](components/cds-toast/api.md) · [examples](components/cds-toast/examples.md) · [guidelines](components/cds-toast/guidelines.md)
|
|
153
|
+
- See also: For a stream of events where notifications arrive one after another use [CdsToastQueue](components/cds-toast-queue/api.md). A message that has to stay on the page belongs in [CdsNotification](components/cds-notification/api.md), and a question that requires a decision from the user — in the [CdsModal](components/cds-modal/api.md) dialog.
|
|
154
|
+
- **CdsToastQueue** — A queue of pop-up notifications built on [CdsToast](components/cds-toast/api.md). [api](components/cds-toast-queue/api.md) · [examples](components/cds-toast-queue/examples.md)
|
|
155
|
+
- See also: For a single notification — a save confirmation, for example — [CdsToast](components/cds-toast/api.md) is enough.
|
|
156
|
+
|
|
157
|
+
## Layouts (8)
|
|
158
|
+
|
|
159
|
+
- **CdsDrawer** — The side panel of the application: navigation sections on the left, the context of a record or filters on the right. [api](components/cds-drawer/api.md) · [examples](components/cds-drawer/examples.md) · [guidelines](components/cds-drawer/guidelines.md)
|
|
160
|
+
- See also: For a list of sections inside the drawer take [CdsList](components/cds-list/api.md); for navigating the subsections of a single page take [CdsTabs](components/cds-tabs/api.md). The drawer is a part of the [CdsLayout](components/cds-layout/api.md) frame, but unlike the other parts it also works on its own: with the `fixed` prop it sticks to the window without a layout.
|
|
161
|
+
- **CdsFooter** — The footer of the application: a copyright notice and utility links on regular pages, an action bar on forms. [api](components/cds-footer/api.md) · [examples](components/cds-footer/examples.md) · [guidelines](components/cds-footer/guidelines.md)
|
|
162
|
+
- See also: The footer works only inside [CdsLayout](components/cds-layout/api.md) — outside the layout it renders nothing and warns about it in the console. The top bar of the application is built by [CdsHeader](components/cds-header/api.md), and the content of both by [CdsToolbar](components/cds-toolbar/api.md).
|
|
163
|
+
- **CdsGrid** — A responsive modular grid: `CdsGrid`, `CdsRow` and `CdsCol` lay the content out in columns — from 4 on a phone to 16 on wide screens. [api](components/cds-grid/api.md) · [examples](components/cds-grid/examples.md) · [guidelines](components/cds-grid/guidelines.md)
|
|
164
|
+
- See also: The grid lays out the content inside a page. Build the frame of the application — the header, the drawers and the footer — from [CdsLayout](components/cds-layout/api.md).
|
|
165
|
+
- **CdsHeader** — The header of the application: the title, the global search, notifications, the profile — everything that has to be at hand on any screen. [api](components/cds-header/api.md) · [examples](components/cds-header/examples.md) · [guidelines](components/cds-header/guidelines.md)
|
|
166
|
+
- See also: The header works only inside [CdsLayout](components/cds-layout/api.md) — outside the layout it renders nothing and warns about it in the console. The content of the header is laid out by [CdsToolbar](components/cds-toolbar/api.md), and the bottom bar of the application is built by [CdsFooter](components/cds-footer/api.md).
|
|
167
|
+
- **CdsLayout** — The frame of the application: `CdsLayout` places the header, the side drawers, the content and the footer, measures their sizes and takes the scrolling over. [api](components/cds-layout/api.md) · [examples](components/cds-layout/examples.md) · [guidelines](components/cds-layout/guidelines.md)
|
|
168
|
+
- See also: The parts of the layout are described on their own pages: [CdsHeader](components/cds-header/api.md), [CdsDrawer](components/cds-drawer/api.md), [CdsMain](components/cds-main/api.md), [CdsPage](components/cds-page/api.md), [CdsFooter](components/cds-footer/api.md) and [CdsToolbar](components/cds-toolbar/api.md). You can assemble the frame with the mouse and copy the ready code in the layout builder.
|
|
169
|
+
- **CdsMain** — The main area of the application: `CdsMain` is the place where the content of the page lands. [api](components/cds-main/api.md) · [examples](components/cds-main/examples.md)
|
|
170
|
+
- See also: Put the content into [CdsPage](components/cds-page/api.md) — it calculates the minimum height of the page. `CdsMain` works only inside [CdsLayout](components/cds-layout/api.md): outside the layout it renders nothing and warns about it in the console.
|
|
171
|
+
- **CdsPage** — A page inside the layout: `CdsPage` gives the content a minimum height that accounts for the header and the footer, so a short page fills the whole screen instead of hanging as a narrow strip at the top. [api](components/cds-page/api.md) · [examples](components/cds-page/examples.md)
|
|
172
|
+
- See also: `CdsPage` lives inside [CdsMain](components/cds-main/api.md) — outside it renders nothing and warns about it in the console. The paddings around the whole content area are calculated by [CdsLayout](components/cds-layout/api.md).
|
|
173
|
+
- **CdsToolbar** — A horizontal bar with a title and actions: it fills the header and the footer of the application, and on a page it assembles the title of a section together with its buttons. [api](components/cds-toolbar/api.md) · [examples](components/cds-toolbar/examples.md) · [guidelines](components/cds-toolbar/guidelines.md)
|
|
174
|
+
- See also: The toolbar only lays the content out — the place in the layout is reserved by [CdsHeader](components/cds-header/api.md) and [CdsFooter](components/cds-footer/api.md). For navigating the subsections take [CdsTabs](components/cds-tabs/api.md); for an action bar over a record take [CdsButtonGroup](components/cds-button-group/api.md).
|
|
175
|
+
|
|
176
|
+
## Navigation (5)
|
|
177
|
+
|
|
178
|
+
- **CdsBreadcrumbs** — Breadcrumbs show the path to the current page in the hierarchy of sections and take you back to any level above in one click. [api](components/cds-breadcrumbs/api.md) · [examples](components/cds-breadcrumbs/examples.md) · [guidelines](components/cds-breadcrumbs/guidelines.md)
|
|
179
|
+
- See also: To switch between sections of the same level, use [CdsTabs](components/cds-tabs/api.md); for a link styled as text inside a paragraph, use [CdsLink](components/cds-link/api.md); and to move through the steps of a process, use [CdsSteps](components/cds-steps/api.md).
|
|
180
|
+
- **CdsLink** — A link sends the user somewhere else: to a neighboring page of the application, to an external service or to an email address. [api](components/cds-link/api.md) · [examples](components/cds-link/examples.md) · [guidelines](components/cds-link/guidelines.md)
|
|
181
|
+
- See also: If the element triggers an action instead of a navigation — saves, deletes, opens a modal — take [CdsButton](components/cds-button/api.md). A button also accepts `href` or `to` when a navigation has to look like a button. The path through the hierarchy of sections is built by [CdsBreadcrumbs](components/cds-breadcrumbs/api.md), and sections of equal weight are switched by [CdsTabs](components/cds-tabs/api.md).
|
|
182
|
+
- **CdsPagination** — Pagination splits a large data set into pages and helps you jump to the one you need: numbered buttons, "back" and "forward" arrows, jumps to the first and the last page, and a quick jump field. [api](components/cds-pagination/api.md) · [examples](components/cds-pagination/examples.md) · [guidelines](components/cds-pagination/guidelines.md)
|
|
183
|
+
- See also: Pagination pages through homogeneous data — a list or a table. To switch between sections of the interface use [CdsTabs](components/cds-tabs/api.md), and to navigate the hierarchy of pages use [CdsBreadcrumbs](components/cds-breadcrumbs/api.md).
|
|
184
|
+
- **CdsSteps** — The stepper walks the user through a multi-step process: it shows which steps are done, which one is active and how many are left. [api](components/cds-steps/api.md) · [examples](components/cds-steps/examples.md) · [guidelines](components/cds-steps/guidelines.md)
|
|
185
|
+
- See also: To show the progress of a business process without step navigation, use [CdsStages](components/cds-stages/api.md); for sections of equal weight that are switched in any order, use [CdsTabs](components/cds-tabs/api.md).
|
|
186
|
+
- **CdsTabs** — Tabs split the screen into sections of equal weight and switch between them in place, without going to another page. [api](components/cds-tabs/api.md) · [examples](components/cds-tabs/examples.md) · [guidelines](components/cds-tabs/guidelines.md)
|
|
187
|
+
- See also: For a sequential process with steps and progress, use [CdsSteps](components/cds-steps/api.md); to pick a single value in a form, use [CdsButtonToggle](components/cds-button-toggle/api.md).
|
|
188
|
+
|
|
189
|
+
## Other (2)
|
|
190
|
+
|
|
191
|
+
- **CdsApp** — _purpose not described on the documentation page_. [api](components/cds-app/api.md)
|
|
192
|
+
- **CdsDefaultsProvider** — _purpose not described on the documentation page_. [api](components/cds-defaults-provider/api.md)
|
|
193
|
+
|
|
194
|
+
## Head-to-head cases
|
|
195
|
+
|
|
196
|
+
Below are the cases where it is easy to pick the wrong component. They cannot
|
|
197
|
+
be derived from the metadata, so this section is maintained by hand.
|
|
198
|
+
|
|
199
|
+
### Picking from a list: CdsSelect vs CdsCombobox vs CdsAutocomplete
|
|
200
|
+
|
|
201
|
+
| Component | When to take it |
|
|
202
|
+
| --- | --- |
|
|
203
|
+
| `CdsSelect` | The value set is known in advance and small: status, category, country. No keyboard input. |
|
|
204
|
+
| `CdsAutocomplete` | The set is known but long: the user types a query, the list is filtered, matches are highlighted. |
|
|
205
|
+
| `CdsCombobox` | The value may not be in the list: the entered text itself becomes the value (tags, a free-form category). |
|
|
206
|
+
|
|
207
|
+
The deciding question: **can the user enter a value that is not in the
|
|
208
|
+
list?** Yes — `CdsCombobox`. No, but the list is long — `CdsAutocomplete`.
|
|
209
|
+
No, and the list is short — `CdsSelect`.
|
|
210
|
+
|
|
211
|
+
### Input fields: CdsTextInput vs CdsInput vs CdsField
|
|
212
|
+
|
|
213
|
+
- `CdsTextInput` — the **ready-made field** you need in 95% of cases: label,
|
|
214
|
+
hint, errors, and the field itself are already wired together.
|
|
215
|
+
- `CdsInput` and `CdsField` — **atoms** for building your own control when no
|
|
216
|
+
ready-made one exists. Assembling a form from them by hand means
|
|
217
|
+
reimplementing `CdsTextInput` — first verify that the ready-made control
|
|
218
|
+
really does not fit.
|
|
219
|
+
- `CdsTextArea` — the same `CdsTextInput`, but for multiline text.
|
|
220
|
+
|
|
221
|
+
### Overlays: CdsModal vs CdsMenu vs CdsTooltip vs CdsDrawer
|
|
222
|
+
|
|
223
|
+
| Component | When to take it |
|
|
224
|
+
| --- | --- |
|
|
225
|
+
| `CdsModal` | The task demands attention and a response: a confirmation, a form, losing context is unacceptable. |
|
|
226
|
+
| `CdsMenu` | A dropdown list of actions or options anchored to a trigger element. |
|
|
227
|
+
| `CdsTooltip` | A short hint on hover. Nothing interactive goes inside. |
|
|
228
|
+
| `CdsDrawer` | A page-level **side navigation panel** (Layouts category), not a pop-up form panel. For a side form take `CdsModal`. |
|
|
229
|
+
|
|
230
|
+
### Data lists: CdsList vs CdsTable vs CdsTree vs CdsVirtualScroll
|
|
231
|
+
|
|
232
|
+
- `CdsList` — a flat list of uniform items.
|
|
233
|
+
- `CdsTable` — columnar data, when you need sorting, filtering, pagination,
|
|
234
|
+
row selection, or a sticky header. Do not build a table out of `CdsList`
|
|
235
|
+
and markup.
|
|
236
|
+
- `CdsTree` — a hierarchy with expandable nodes, including async loading.
|
|
237
|
+
- `CdsVirtualScroll` — not a standalone kind of list but a **performance
|
|
238
|
+
technique**: it wraps a long list so that only the visible items live in
|
|
239
|
+
the DOM. `CdsTable` and `CdsTree` have virtualization built in.
|
|
240
|
+
|
|
241
|
+
### Notifications: CdsNotification vs CdsToast vs CdsNotificationAlert vs CdsStatus vs CdsBadge
|
|
242
|
+
|
|
243
|
+
| Component | When to take it |
|
|
244
|
+
| --- | --- |
|
|
245
|
+
| `CdsNotification` | A message **in the page flow**: a form error, a warning inside a block. |
|
|
246
|
+
| `CdsToast` | A short-lived result of an action on top of the page, disappears on its own. For a queue — `CdsToastQueue`. |
|
|
247
|
+
| `CdsNotificationAlert` | A pop-up notification on top of the page that needs attention longer than a toast. |
|
|
248
|
+
| `CdsStatus` | **Not a notification** but a non-interactive indicator of an object's state in a list or card. |
|
|
249
|
+
| `CdsBadge` | A counter or label on another element (unread items, a count). |
|
|
250
|
+
|
|
251
|
+
### Waiting: CdsSkeletonLoader vs CdsProgressCircle vs CdsProgressBar
|
|
252
|
+
|
|
253
|
+
- `CdsSkeletonLoader` — loading **content with a known shape**: cards, table
|
|
254
|
+
rows. The preferred option — less layout "jumping".
|
|
255
|
+
- `CdsProgressCircle` — waiting of unknown duration in a small area.
|
|
256
|
+
- `CdsProgressBar` — progress with a **measurable completion fraction**.
|
|
257
|
+
- `CdsLoader` — **deprecated**, do not use in new code.
|
|
258
|
+
|
|
259
|
+
A button waiting for a server response needs no separate indicator:
|
|
260
|
+
`CdsButton` has a `loading` prop.
|
|
261
|
+
|
|
262
|
+
### Step-by-step processes: CdsSteps vs CdsStages vs CdsTabs vs CdsExpandablePanel
|
|
263
|
+
|
|
264
|
+
- `CdsSteps` — a linear wizard whose steps are completed in order.
|
|
265
|
+
- `CdsStages` — the progress of a business process whose status is changed by
|
|
266
|
+
something other than the user.
|
|
267
|
+
- `CdsTabs` — equal sections of a single screen, order does not matter.
|
|
268
|
+
- `CdsExpandablePanel` — a vertical list of sections that expand in place;
|
|
269
|
+
suitable for FAQs and long forms with grouped fields.
|
|
270
|
+
|
|
271
|
+
### Toggles: CdsCheckbox vs CdsToggle vs CdsButtonToggle vs CdsRadioGroup
|
|
272
|
+
|
|
273
|
+
- `CdsCheckbox` — an independent on/off option whose result applies on form
|
|
274
|
+
submit.
|
|
275
|
+
- `CdsToggle` — a switch that applies **immediately**: a setting, a display
|
|
276
|
+
mode.
|
|
277
|
+
- `CdsRadioGroup` — exactly one option out of several. A lone `CdsRadio`
|
|
278
|
+
outside a group is not used.
|
|
279
|
+
- `CdsButtonToggle` — the same single-choice selection, but with buttons:
|
|
280
|
+
display modes, short mutually exclusive filters.
|
|
281
|
+
|
|
282
|
+
### Files: CdsFileInput vs CdsFileUpload vs CdsUploader
|
|
283
|
+
|
|
284
|
+
- `CdsFileInput` — compact file selection via an input field, when the file
|
|
285
|
+
is one of the form's fields.
|
|
286
|
+
- `CdsFileUpload` — a zone with drag-and-drop and clipboard paste, when the
|
|
287
|
+
upload is the screen's main action.
|
|
288
|
+
- `CdsUploader` — sending files to a server with upload tracking.
|
|
289
|
+
|
|
290
|
+
### Date and time: CdsDateInput vs CdsDatePicker vs CdsTimePicker
|
|
291
|
+
|
|
292
|
+
- `CdsDateInput` — a **form field**: text input plus a calendar in a dropdown
|
|
293
|
+
menu. The usual choice for forms.
|
|
294
|
+
- `CdsDatePicker` — the calendar itself, embedded in the page without a
|
|
295
|
+
field.
|
|
296
|
+
- `CdsTimePicker` — time selection.
|
|
297
|
+
|
|
298
|
+
### Containers: CdsSurface vs CdsCard
|
|
299
|
+
|
|
300
|
+
- `CdsCard` — a cohesive block of content with a border: title, text,
|
|
301
|
+
actions.
|
|
302
|
+
- `CdsSurface` — a low-level surface with configurable background and sizes.
|
|
303
|
+
Take it only when the card semantics do not apply.
|
|
304
|
+
|
|
305
|
+
### Button or link
|
|
306
|
+
|
|
307
|
+
What matters is **what happens**, not the appearance: navigating to an
|
|
308
|
+
address — `CdsLink` (or `CdsButton` with `to` / `href` if it is the screen's
|
|
309
|
+
main action), changing state — `CdsButton`. A link styled as a button is
|
|
310
|
+
still a link — it must open in a new tab and be copyable.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# CdsApp — API
|
|
2
|
+
|
|
3
|
+
> Generated from meta.json by `bun run generate:skill`. Do not edit manually.
|
|
4
|
+
> Tokens: [tokens.md](tokens.md)
|
|
5
|
+
|
|
6
|
+
## CdsApp
|
|
7
|
+
|
|
8
|
+
**Props**
|
|
9
|
+
|
|
10
|
+
| Prop | Type | Default | Required | Description |
|
|
11
|
+
| --- | --- | --- | --- | --- |
|
|
12
|
+
| `storybook` | `boolean \| "fluid" \| undefined` | `false` | no | Режим отображения внутри Storybook: убирает полноэкранную обёртку, `'fluid'` дополнительно снимает ограничение ширины |
|
|
13
|
+
| `theme` | `string \| undefined` | — | no | Component theme |
|
|
14
|
+
|
|
15
|
+
**Slots**
|
|
16
|
+
|
|
17
|
+
| Name | Type | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| `default` | `any` | Default slot |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# CdsApp — tokens (level 3)
|
|
2
|
+
|
|
3
|
+
> Copy of the component's `styles/*.variables.scss`, taken by `bun run generate:skill`. Do not edit manually.
|
|
4
|
+
> `--cds-*` are global level-2 tokens whose values come from the active theme: see [themes.md](../../tokens/themes.md).
|
|
5
|
+
> Variables marked `!default` can be overridden at build time via SCSS.
|
|
6
|
+
|
|
7
|
+
## _CdsApp.variables.scss
|
|
8
|
+
|
|
9
|
+
```scss
|
|
10
|
+
$application-background: rgb(var(--cds-color-page-primary)) !default;
|
|
11
|
+
$application-color: rgb(var(--cds-color-content-primary)) !default;
|
|
12
|
+
```
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# CdsAutocomplete — API
|
|
2
|
+
|
|
3
|
+
> Generated from meta.json by `bun run generate:skill`. Do not edit manually.
|
|
4
|
+
> Examples: [examples.md](examples.md) · Guidelines: [guidelines.md](guidelines.md) · Tokens: [tokens.md](tokens.md)
|
|
5
|
+
|
|
6
|
+
An autocomplete is a field for picking from a long list: the user types a query, the list is filtered on the fly and the matches are highlighted. The field is built on [CdsTextInput](../cds-text-input/api.md), and the menu and the list are the same as in [CdsSelect](../cds-select/api.md), so the label, the messages, validation and the menu behave identically.
|
|
7
|
+
|
|
8
|
+
## CdsAutocomplete
|
|
9
|
+
|
|
10
|
+
**Props**
|
|
11
|
+
|
|
12
|
+
| Prop | Type | Default | Required | Description |
|
|
13
|
+
| --- | --- | --- | --- | --- |
|
|
14
|
+
| `active` | `boolean \| undefined` | — | no | Active state of the field |
|
|
15
|
+
| `activeColor` | `string \| undefined` | — | no | Color of the component in its active state |
|
|
16
|
+
| `appendIcon` | `IconValue \| undefined` | — | no | Icon in the append slot, after the content |
|
|
17
|
+
| `appendInnerIcon` | `IconValue \| undefined` | — | no | Icon in the inner append slot, after the content of the field |
|
|
18
|
+
| `autocomplete` | `string \| undefined` | `'off'` | no | Helps to influence browser suggestions. The `suppress` value changes the name attribute of the fields, and `off` relies on the browser to stop suggesting values on its own. Any other value is passed to the built-in autocomplete of the corresponding element. |
|
|
19
|
+
| `autofocus` | `boolean \| undefined` | — | no | Enables autofocus |
|
|
20
|
+
| `autoSelectFirst` | `boolean \| "exact" \| undefined` | — | no | Highlights the first matching item as you type; Enter or Tab select it. The `exact` value highlights it only on a full match of the search query with the item title. |
|
|
21
|
+
| `baseColor` | `string \| undefined` | — | no | Color of the component in its inactive state |
|
|
22
|
+
| `bgColor` | `string \| undefined` | — | no | Background color of the component |
|
|
23
|
+
| `centerAffix` | `boolean \| undefined` | — | no | Vertically center the appendInner, prependInner, clearIcon and label elements. |
|
|
24
|
+
| `chips` | `boolean \| undefined` | — | no | Shows the selected values as removable chips (CdsTag). |
|
|
25
|
+
| `clearable` | `boolean \| undefined` | — | no | Shows the clear button |
|
|
26
|
+
| `clearIcon` | `IconValue \| undefined` | `'remove'` | no | Icon of the clear button |
|
|
27
|
+
| `clearOnSelect` | `boolean \| undefined` | — | no | Clears the search query after an item is selected (relevant for `multiple`). |
|
|
28
|
+
| `closableChips` | `boolean \| undefined` | — | no | Adds a remove button to the chips (relevant together with `chips`). |
|
|
29
|
+
| `closeText` | `string \| undefined` | `'$cds.close'` | no | Text for screen readers describing the close action of the menu. |
|
|
30
|
+
| `color` | `string \| undefined` | — | no | Component color |
|
|
31
|
+
| `counter` | `string \| number \| boolean \| undefined` | — | no | Character counter. Accepts a boolean, a number or a string |
|
|
32
|
+
| `counterValue` | `number \| ((value: any) => number) \| undefined` | — | no | Custom counter value. Either a number or a function computing it from the current value |
|
|
33
|
+
| `customFilter` | `FilterFunction \| undefined` | — | no | Your own value filtering function. Receives the value, the search query and the item, returns a match or `-1` |
|
|
34
|
+
| `customKeyFilter` | `FilterKeyFunctions \| undefined` | — | no | Separate filtering functions for specific item keys — an object of the form `{ key: function }` |
|
|
35
|
+
| `description` | `string \| undefined` | — | no | Description of the component, shown under the label |
|
|
36
|
+
| `disabled` | `boolean \| null \| undefined` | `null` | no | Disabled state |
|
|
37
|
+
| `eager` | `boolean \| undefined` | — | no | Renders the menu content upfront, without waiting for the first opening. |
|
|
38
|
+
| `ellipsis` | `boolean \| undefined` | — | no | In multiple mode keeps the selected values on a single line with an ellipsis |
|
|
39
|
+
| `error` | `boolean \| undefined` | — | no | Error state |
|
|
40
|
+
| `errorMessages` | `string \| readonly string[] \| null \| undefined` | `[]` | no | Puts the component into the error state and passes custom error messages. They are merged with any checks defined in the `rules` prop. This field does not trigger validation. |
|
|
41
|
+
| `filterKeys` | `FilterKeys \| undefined` | `['title']` | no | Item keys the search runs over. By default filtering goes by the item title |
|
|
42
|
+
| `filterMode` | `FilterMode \| undefined` | `'intersection'` | no | How the results of `customKeyFilter` and of the general filtering are combined: by intersection, by union or by replacement |
|
|
43
|
+
| `focused` | `boolean \| undefined` | — | no | Controls the focus state of the component. When `true`, the component is considered focused and may apply the corresponding styles or behavior. |
|
|
44
|
+
| `hideDetails` | `boolean \| "auto" \| undefined` | — | no | Hides the details block (messages and hints). With the 'auto' value the block is hidden when there are no messages |
|
|
45
|
+
| `hideMessages` | `boolean \| undefined` | — | no | Hide the messages under the input |
|
|
46
|
+
| `hideNoData` | `boolean \| undefined` | — | no | Hides the menu and the "no data" placeholder when the item list is empty. |
|
|
47
|
+
| `hideSelected` | `boolean \| undefined` | — | no | Hides the already selected items from the menu list. |
|
|
48
|
+
| `hint` | `string \| undefined` | — | no | Hint text shown under the input |
|
|
49
|
+
| `iconColor` | `string \| boolean \| undefined` | — | no | Icon color. Accepts a boolean or a color string |
|
|
50
|
+
| `id` | `string \| undefined` | — | no | Unique identifier of the component |
|
|
51
|
+
| `isSelectAll` | `string \| boolean \| undefined` | `false` | no | Adds a "select all" entry as the first item of the list (for `multiple` only). `true` uses the default `$cds.selectAll` caption, a string sets your own caption. |
|
|
52
|
+
| `itemChildren` | `SelectItemKey` | `false` | no | Object field that holds the child items, or a function that returns them |
|
|
53
|
+
| `itemColor` | `string \| undefined` | — | no | Color of the selected items in the menu list. `color` is used by default. |
|
|
54
|
+
| `itemProps` | `SelectItemKey` | `'props'` | no | Object field that holds the props of the item, or a function that returns them |
|
|
55
|
+
| `items` | `any[] \| undefined` | `[]` | no | Array of items to display |
|
|
56
|
+
| `itemTitle` | `SelectItemKey` | `'title'` | no | Object field used as the item title, or a function that returns it |
|
|
57
|
+
| `itemType` | `SelectItemKey` | `'type'` | no | Object field that defines the item type (`item`, `divider`, `subheader`), or a function that returns it |
|
|
58
|
+
| `itemValue` | `SelectItemKey` | `'value'` | no | Object field used as the item value, or a function that returns it |
|
|
59
|
+
| `label` | `string \| undefined` | — | no | Label text of the component |
|
|
60
|
+
| `listProps` | `CdsListProps \| undefined` | — | no | Props passed through to the inner CdsList component. |
|
|
61
|
+
| `loading` | `string \| boolean \| undefined` | — | no | Loading indicator for the component |
|
|
62
|
+
| `maxErrors` | `string \| number \| undefined` | `1` | no | Maximum number of validation errors shown |
|
|
63
|
+
| `maxWidth` | `string \| number \| undefined` | — | no | Maximum component width |
|
|
64
|
+
| `menu` | `boolean \| undefined` | — | no | Controls the open state of the dropdown menu (v-model:menu). |
|
|
65
|
+
| `menuHeight` | `string \| number \| undefined` | `178` | no | Maximum height of the dropdown menu. |
|
|
66
|
+
| `menuIcon` | `IconValue \| undefined` | `'chevron-down'` | no | Icon indicating that the menu can be expanded. |
|
|
67
|
+
| `menuProps` | `CdsMenuProps \| undefined` | — | no | Props passed through to the inner CdsMenu component. |
|
|
68
|
+
| `messages` | `string \| readonly string[] \| undefined` | `[]` | no | Messages shown under the input |
|
|
69
|
+
| `minWidth` | `string \| number \| undefined` | — | no | Minimum component width |
|
|
70
|
+
| `modelModifiers` | `Record<string, boolean> \| undefined` | — | no | v-model modifiers passed by Vue to process the field value |
|
|
71
|
+
| `modelValue` | `any` | `null` | no | Value of the component in v-model. If the component supports the multiple prop, an empty array is used by default. |
|
|
72
|
+
| `multiple` | `boolean \| undefined` | — | no | Allows selecting several values. The selected items are shown as chips or as a list. |
|
|
73
|
+
| `name` | `string \| undefined` | — | no | Name of the input |
|
|
74
|
+
| `noDataText` | `string \| undefined` | `'$cds.noDataText'` | no | Text shown in the menu when the item list is empty. |
|
|
75
|
+
| `noFilter` | `boolean \| undefined` | — | no | Turns off the built-in filtering — the list is shown as is, the search is handled outside |
|
|
76
|
+
| `openOnClear` | `boolean \| undefined` | — | no | Opens the menu after the value is cleared. |
|
|
77
|
+
| `openText` | `string \| undefined` | `'$cds.open'` | no | Text for screen readers describing the open action of the menu. |
|
|
78
|
+
| `persistentClearable` | `boolean \| undefined` | — | no | Always show the clear button, not only on hover or focus |
|
|
79
|
+
| `persistentCounter` | `boolean \| undefined` | — | no | Always show the counter, not only while the field is in use |
|
|
80
|
+
| `persistentHint` | `boolean \| undefined` | — | no | Always show the hint, not only on focus |
|
|
81
|
+
| `persistentPlaceholder` | `boolean \| undefined` | — | no | Always show the placeholder instead of hiding it while the field is in use |
|
|
82
|
+
| `placeholder` | `string \| undefined` | — | no | Placeholder text shown in an empty field |
|
|
83
|
+
| `prefix` | `string \| undefined` | — | no | Text prefix shown before the field value |
|
|
84
|
+
| `prependIcon` | `IconValue \| undefined` | — | no | Icon in the prepend slot, before the content |
|
|
85
|
+
| `prependInnerIcon` | `IconValue \| undefined` | — | no | Icon in the inner prepend slot, before the content of the field |
|
|
86
|
+
| `readonly` | `boolean \| null \| undefined` | `null` | no | Read-only state |
|
|
87
|
+
| `returnObject` | `boolean \| undefined` | — | no | Return an object in the model value instead of an array |
|
|
88
|
+
| `reverse` | `boolean \| undefined` | — | no | Reverses the order of the elements inside the field |
|
|
89
|
+
| `role` | `string \| undefined` | `'combobox'` | no | ARIA role for the native input element |
|
|
90
|
+
| `rules` | `readonly ValidationRule[] \| undefined` | `[]` | no | Accepts an array of items of different types: functions, booleans and strings. Functions take the input value as an argument and must return either true / false, or a string with an error message. The input goes into the error state if a function returns false (or any value in the array is false) or is a string. |
|
|
91
|
+
| `search` | `string \| undefined` | — | no | Current value of the search query used to filter the items (v-model:search). |
|
|
92
|
+
| `size` | `number \| "xs" \| "sm" \| "md" \| "lg" \| "xl" \| undefined` | `'md'` | no | Size of the component |
|
|
93
|
+
| `suffix` | `string \| undefined` | — | no | Text suffix shown after the field value |
|
|
94
|
+
| `textColor` | `string \| undefined` | — | no | Text color of the component |
|
|
95
|
+
| `theme` | `string \| undefined` | — | no | Component theme |
|
|
96
|
+
| `transition` | `string \| boolean \| (TransitionProps & { component?: Component \| undefined; }) \| { component: Component; } \| null \| undefined` | `{ component: CdsModalTransition }` | no | Transition animation |
|
|
97
|
+
| `type` | `string \| undefined` | `'text'` | no | Type of the native input |
|
|
98
|
+
| `validateOn` | `ValidateOn \| undefined` | — | no | Changes the type of the event that triggers validation |
|
|
99
|
+
| `valueComparator` | `ValueComparator \| undefined` | — | no | Function that compares item values to determine the selected state |
|
|
100
|
+
| `width` | `string \| number \| undefined` | — | no | Component width |
|
|
101
|
+
|
|
102
|
+
**Events**
|
|
103
|
+
|
|
104
|
+
| Name | Type | Description |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
| `update:focused` | `[focused: boolean]` | The focus state of the component changed (v-model:focused). |
|
|
107
|
+
| `update:menu` | `[value: boolean]` | The open state of the dropdown menu changed (v-model:menu). |
|
|
108
|
+
| `update:modelValue` | `[value: any]` | The selected value changed (v-model). |
|
|
109
|
+
| `update:search` | `[value: string]` | The search query changed (v-model:search). |
|
|
110
|
+
| `update:selectedAll` | `[value: boolean]` | The "all selected" state changed (for `multiple` + `isSelectAll` only). |
|
|
111
|
+
|
|
112
|
+
**Slots**
|
|
113
|
+
|
|
114
|
+
| Name | Type | Description |
|
|
115
|
+
| --- | --- | --- |
|
|
116
|
+
| `append` | `CdsInputSlot` | Adds an element after the input |
|
|
117
|
+
| `append-inner` | `CdsInputDefaultSlot` | Slot added at the end of the input |
|
|
118
|
+
| `append-item` | `any` | Content after the item list in the menu. |
|
|
119
|
+
| `chip` | `{ item: any; internalItem: ListItem<any>; index: number; props: Record<string, unknown>; }` | Custom rendering of the chip of a selected value (relevant together with `chips`). |
|
|
120
|
+
| `clear` | `CdsInputDefaultSlot & { props: Record<string, any>; }` | Slot for a custom clear icon (shown when the clearable prop is true). |
|
|
121
|
+
| `description` | `{ description: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsDescription component |
|
|
122
|
+
| `details` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
123
|
+
| `divider` | `{ props: Record<string, unknown>; index: number; }` | Custom rendering of a divider in the menu list. |
|
|
124
|
+
| `item` | `{ item: any; internalItem: ListItem<any>; index: number; props: Record<string, unknown>; }` | Custom rendering of an item of the menu list. |
|
|
125
|
+
| `label` | `{ label: string \| undefined; props: Record<string, any>; }` | Default slot of the CdsLabel component |
|
|
126
|
+
| `loader` | `LoaderSlotProps` | Slot for a custom loader (shown when the loading prop is true). |
|
|
127
|
+
| `menu-footer` | `{ search: Ref<string \| undefined, string \| undefined>; filteredItems: ListItem<any>[]; }` | Content of the menu footer. Receives the current search query and the filtered items. |
|
|
128
|
+
| `menu-header` | `{ search: Ref<string \| undefined, string \| undefined>; filteredItems: ListItem<any>[]; }` | Content of the menu header. Receives the current search query and the filtered items. |
|
|
129
|
+
| `message` | `CdsMessagesSlots` | Slot for customizing the content of a message |
|
|
130
|
+
| `messages` | `CdsInputSlot` | Slot for custom content that lets you customize how the messages are displayed |
|
|
131
|
+
| `no-data` | `any` | Content shown in the menu when the item list is empty. |
|
|
132
|
+
| `prepend` | `CdsInputSlot` | Adds an element before the input |
|
|
133
|
+
| `prepend-inner` | `CdsInputDefaultSlot` | Slot added at the start of the input |
|
|
134
|
+
| `prepend-item` | `any` | Content before the item list in the menu. |
|
|
135
|
+
| `selection` | `{ item: any; internalItem: ListItem<any>; index: number; }` | Custom rendering of the selected value inside the field. |
|
|
136
|
+
| `subheader` | `{ props: Record<string, unknown>; index: number; }` | Custom rendering of a group subheader in the menu list. |
|
|
137
|
+
|
|
138
|
+
**Exposed**
|
|
139
|
+
|
|
140
|
+
| Name | Type | Description |
|
|
141
|
+
| --- | --- | --- |
|
|
142
|
+
| `controlRef` | `HTMLElement \| undefined` | Ref to the control of the input |
|
|
143
|
+
| `fieldIconColor` | `string \| undefined` | Icon color |
|
|
144
|
+
| `filteredItems` | `ListItem<any>[]` | Items filtered by the current search query. |
|
|
145
|
+
| `isDirty` | `boolean` | Whether the input is dirty |
|
|
146
|
+
| `isDisabled` | `boolean` | Whether the input is disabled |
|
|
147
|
+
| `isFocused` | `boolean` | Whether the component is focused. |
|
|
148
|
+
| `isPure` | `boolean` | Whether the search query has not changed since the last selection. |
|
|
149
|
+
| `isReadonly` | `boolean` | Whether the input is read-only |
|
|
150
|
+
| `isValid` | `boolean \| null` | Whether the input is valid |
|
|
151
|
+
| `isValidating` | `boolean` | Whether the input is being validated |
|
|
152
|
+
| `reset` | `() => Promise<void>` | Resets the input to its initial state |
|
|
153
|
+
| `resetValidation` | `() => Promise<void>` | Resets the validation of the input |
|
|
154
|
+
| `selectAll` | `() => void` | Toggle the selection of all available items (for `multiple` + `isSelectAll` only). |
|
|
155
|
+
| `validate` | `(silent?: boolean) => Promise<string[]>` | Validates the input |
|