@sanity/ui 5.0.0-alpha.22 → 5.0.0-alpha.24
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/README.md +10 -0
- package/dist/index.d.ts +15 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +76 -59
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/docs/components/avatar-counter.dsds.yaml +78 -0
- package/docs/components/avatar-stack.dsds.yaml +96 -0
- package/docs/components/avatar.dsds.yaml +115 -0
- package/docs/components/badge.dsds.yaml +126 -0
- package/docs/components/box.dsds.yaml +223 -0
- package/docs/components/button.dsds.yaml +296 -0
- package/docs/components/card.dsds.yaml +317 -0
- package/docs/components/checkbox.dsds.yaml +204 -0
- package/docs/components/code.dsds.yaml +169 -0
- package/docs/components/container.dsds.yaml +189 -0
- package/docs/components/dialog.dsds.yaml +343 -0
- package/docs/components/divider.dsds.yaml +93 -0
- package/docs/components/eyebrow.dsds.yaml +198 -0
- package/docs/components/flex.dsds.yaml +237 -0
- package/docs/components/grid.dsds.yaml +217 -0
- package/docs/components/h-stack.dsds.yaml +127 -0
- package/docs/components/heading.dsds.yaml +233 -0
- package/docs/components/hotkeys.dsds.yaml +60 -0
- package/docs/components/icon-button.dsds.yaml +227 -0
- package/docs/components/icon.dsds.yaml +275 -0
- package/docs/components/indicator-stack.dsds.yaml +98 -0
- package/docs/components/indicator.dsds.yaml +108 -0
- package/docs/components/inline.dsds.yaml +127 -0
- package/docs/components/kbd.dsds.yaml +59 -0
- package/docs/components/link.dsds.yaml +108 -0
- package/docs/components/list-button-item.dsds.yaml +103 -0
- package/docs/components/list-item-image.dsds.yaml +82 -0
- package/docs/components/list-item-text.dsds.yaml +80 -0
- package/docs/components/list-item.dsds.yaml +148 -0
- package/docs/components/list.dsds.yaml +162 -0
- package/docs/components/popover.dsds.yaml +214 -0
- package/docs/components/press-area.dsds.yaml +279 -0
- package/docs/components/radio.dsds.yaml +198 -0
- package/docs/components/select.dsds.yaml +214 -0
- package/docs/components/skip-to-content.dsds.yaml +110 -0
- package/docs/components/spinner.dsds.yaml +119 -0
- package/docs/components/switch.dsds.yaml +202 -0
- package/docs/components/tab.dsds.yaml +54 -0
- package/docs/components/tabs-list.dsds.yaml +56 -0
- package/docs/components/tabs-panel.dsds.yaml +54 -0
- package/docs/components/tabs.dsds.yaml +104 -0
- package/docs/components/text-area.dsds.yaml +170 -0
- package/docs/components/text-input.dsds.yaml +189 -0
- package/docs/components/text.dsds.yaml +268 -0
- package/docs/components/tooltip-group.dsds.yaml +90 -0
- package/docs/components/tooltip.dsds.yaml +216 -0
- package/docs/components/v-stack.dsds.yaml +155 -0
- package/docs/components/visually-hidden.dsds.yaml +112 -0
- package/docs/evals/cases.yaml +1319 -0
- package/docs/examples/checkbox-2.tsx +57 -0
- package/docs/examples/confirmation-dialogs-1.tsx +27 -0
- package/docs/examples/confirmation-dialogs-2.tsx +55 -0
- package/docs/examples/confirmation-dialogs-3.tsx +28 -0
- package/docs/examples/confirmation-dialogs-4.tsx +38 -0
- package/docs/examples/popover-1.tsx +48 -0
- package/docs/examples/popover-2.tsx +53 -0
- package/docs/foundations/accessibility-guidelines.dsds.yaml +301 -0
- package/docs/foundations/color-guidelines.dsds.yaml +308 -0
- package/docs/foundations/content-guidelines.dsds.yaml +285 -0
- package/docs/foundations/semantics.dsds.yaml +125 -0
- package/docs/foundations/spacing-guidelines.dsds.yaml +226 -0
- package/docs/foundations/typography-guidelines.dsds.yaml +322 -0
- package/docs/icons/icon-access-denied.dsds.yaml +40 -0
- package/docs/icons/icon-activity.dsds.yaml +40 -0
- package/docs/icons/icon-add-circle.dsds.yaml +14 -0
- package/docs/icons/icon-add-comment.dsds.yaml +34 -0
- package/docs/icons/icon-add-document.dsds.yaml +34 -0
- package/docs/icons/icon-add-user.dsds.yaml +30 -0
- package/docs/icons/icon-add.dsds.yaml +57 -0
- package/docs/icons/icon-api.dsds.yaml +17 -0
- package/docs/icons/icon-archive.dsds.yaml +44 -0
- package/docs/icons/icon-arrow-down.dsds.yaml +38 -0
- package/docs/icons/icon-arrow-left.dsds.yaml +32 -0
- package/docs/icons/icon-arrow-right.dsds.yaml +32 -0
- package/docs/icons/icon-arrow-top-right.dsds.yaml +32 -0
- package/docs/icons/icon-arrow-up.dsds.yaml +44 -0
- package/docs/icons/icon-asterisk.dsds.yaml +18 -0
- package/docs/icons/icon-bar-chart.dsds.yaml +40 -0
- package/docs/icons/icon-basket.dsds.yaml +14 -0
- package/docs/icons/icon-bell.dsds.yaml +30 -0
- package/docs/icons/icon-bill.dsds.yaml +40 -0
- package/docs/icons/icon-binary-document.dsds.yaml +30 -0
- package/docs/icons/icon-block-content.dsds.yaml +30 -0
- package/docs/icons/icon-block-element.dsds.yaml +32 -0
- package/docs/icons/icon-blockquote.dsds.yaml +32 -0
- package/docs/icons/icon-bold.dsds.yaml +28 -0
- package/docs/icons/icon-bolt.dsds.yaml +18 -0
- package/docs/icons/icon-book.dsds.yaml +34 -0
- package/docs/icons/icon-bookmark-filled.dsds.yaml +14 -0
- package/docs/icons/icon-bookmark.dsds.yaml +14 -0
- package/docs/icons/icon-bottle.dsds.yaml +18 -0
- package/docs/icons/icon-bug.dsds.yaml +28 -0
- package/docs/icons/icon-bulb-filled.dsds.yaml +14 -0
- package/docs/icons/icon-bulb-outline.dsds.yaml +30 -0
- package/docs/icons/icon-calendar.dsds.yaml +36 -0
- package/docs/icons/icon-case.dsds.yaml +18 -0
- package/docs/icons/icon-chart-upward.dsds.yaml +40 -0
- package/docs/icons/icon-checkmark-circle.dsds.yaml +40 -0
- package/docs/icons/icon-checkmark.dsds.yaml +36 -0
- package/docs/icons/icon-chevron-down.dsds.yaml +46 -0
- package/docs/icons/icon-chevron-left.dsds.yaml +42 -0
- package/docs/icons/icon-chevron-right.dsds.yaml +42 -0
- package/docs/icons/icon-chevron-up.dsds.yaml +44 -0
- package/docs/icons/icon-circle.dsds.yaml +28 -0
- package/docs/icons/icon-clipboard-image.dsds.yaml +30 -0
- package/docs/icons/icon-clipboard.dsds.yaml +34 -0
- package/docs/icons/icon-clock.dsds.yaml +39 -0
- package/docs/icons/icon-close-circle.dsds.yaml +18 -0
- package/docs/icons/icon-close.dsds.yaml +51 -0
- package/docs/icons/icon-code-block.dsds.yaml +38 -0
- package/docs/icons/icon-code.dsds.yaml +40 -0
- package/docs/icons/icon-cog.dsds.yaml +38 -0
- package/docs/icons/icon-collapse.dsds.yaml +40 -0
- package/docs/icons/icon-color-wheel.dsds.yaml +30 -0
- package/docs/icons/icon-comment.dsds.yaml +38 -0
- package/docs/icons/icon-component.dsds.yaml +18 -0
- package/docs/icons/icon-compose-sparkles.dsds.yaml +36 -0
- package/docs/icons/icon-compose.dsds.yaml +38 -0
- package/docs/icons/icon-confetti.dsds.yaml +18 -0
- package/docs/icons/icon-controls.dsds.yaml +36 -0
- package/docs/icons/icon-copy.dsds.yaml +31 -0
- package/docs/icons/icon-credit-card.dsds.yaml +18 -0
- package/docs/icons/icon-crop.dsds.yaml +32 -0
- package/docs/icons/icon-cube.dsds.yaml +36 -0
- package/docs/icons/icon-dashboard.dsds.yaml +34 -0
- package/docs/icons/icon-database.dsds.yaml +40 -0
- package/docs/icons/icon-desktop.dsds.yaml +31 -0
- package/docs/icons/icon-diamond.dsds.yaml +18 -0
- package/docs/icons/icon-document-pdf.dsds.yaml +34 -0
- package/docs/icons/icon-document-remove.dsds.yaml +30 -0
- package/docs/icons/icon-document-sheet.dsds.yaml +34 -0
- package/docs/icons/icon-document-text.dsds.yaml +30 -0
- package/docs/icons/icon-document-video.dsds.yaml +30 -0
- package/docs/icons/icon-document-word.dsds.yaml +34 -0
- package/docs/icons/icon-document-zip.dsds.yaml +30 -0
- package/docs/icons/icon-document.dsds.yaml +52 -0
- package/docs/icons/icon-documents.dsds.yaml +30 -0
- package/docs/icons/icon-dot.dsds.yaml +32 -0
- package/docs/icons/icon-double-chevron-down.dsds.yaml +38 -0
- package/docs/icons/icon-double-chevron-left.dsds.yaml +34 -0
- package/docs/icons/icon-double-chevron-right.dsds.yaml +34 -0
- package/docs/icons/icon-double-chevron-up.dsds.yaml +36 -0
- package/docs/icons/icon-double-quote.dsds.yaml +14 -0
- package/docs/icons/icon-download.dsds.yaml +40 -0
- package/docs/icons/icon-drag-handle.dsds.yaml +28 -0
- package/docs/icons/icon-drop.dsds.yaml +30 -0
- package/docs/icons/icon-earth-americas.dsds.yaml +34 -0
- package/docs/icons/icon-earth-globe.dsds.yaml +34 -0
- package/docs/icons/icon-edit.dsds.yaml +34 -0
- package/docs/icons/icon-ellipsis-horizontal.dsds.yaml +32 -0
- package/docs/icons/icon-ellipsis-vertical.dsds.yaml +14 -0
- package/docs/icons/icon-empty.dsds.yaml +28 -0
- package/docs/icons/icon-enter-right.dsds.yaml +18 -0
- package/docs/icons/icon-enter.dsds.yaml +18 -0
- package/docs/icons/icon-envelope.dsds.yaml +34 -0
- package/docs/icons/icon-equal.dsds.yaml +14 -0
- package/docs/icons/icon-error-filled.dsds.yaml +14 -0
- package/docs/icons/icon-error-outline.dsds.yaml +38 -0
- package/docs/icons/icon-error-screen.dsds.yaml +14 -0
- package/docs/icons/icon-expand.dsds.yaml +36 -0
- package/docs/icons/icon-eye-closed.dsds.yaml +38 -0
- package/docs/icons/icon-eye-open.dsds.yaml +38 -0
- package/docs/icons/icon-face-happy.dsds.yaml +14 -0
- package/docs/icons/icon-face-indifferent.dsds.yaml +14 -0
- package/docs/icons/icon-face-sad.dsds.yaml +14 -0
- package/docs/icons/icon-feedback.dsds.yaml +30 -0
- package/docs/icons/icon-filter.dsds.yaml +38 -0
- package/docs/icons/icon-folder.dsds.yaml +36 -0
- package/docs/icons/icon-generate.dsds.yaml +18 -0
- package/docs/icons/icon-github.dsds.yaml +14 -0
- package/docs/icons/icon-groq.dsds.yaml +31 -0
- package/docs/icons/icon-hash.dsds.yaml +18 -0
- package/docs/icons/icon-heart-filled.dsds.yaml +18 -0
- package/docs/icons/icon-heart.dsds.yaml +18 -0
- package/docs/icons/icon-help-circle.dsds.yaml +38 -0
- package/docs/icons/icon-highlight.dsds.yaml +18 -0
- package/docs/icons/icon-home.dsds.yaml +28 -0
- package/docs/icons/icon-ice-cream.dsds.yaml +18 -0
- package/docs/icons/icon-image-remove.dsds.yaml +32 -0
- package/docs/icons/icon-image.dsds.yaml +36 -0
- package/docs/icons/icon-images.dsds.yaml +34 -0
- package/docs/icons/icon-inbox.dsds.yaml +14 -0
- package/docs/icons/icon-info-filled.dsds.yaml +14 -0
- package/docs/icons/icon-info-outline.dsds.yaml +38 -0
- package/docs/icons/icon-inline-element.dsds.yaml +32 -0
- package/docs/icons/icon-inline.dsds.yaml +18 -0
- package/docs/icons/icon-insert-above.dsds.yaml +32 -0
- package/docs/icons/icon-insert-below.dsds.yaml +32 -0
- package/docs/icons/icon-italic.dsds.yaml +28 -0
- package/docs/icons/icon-joystick.dsds.yaml +18 -0
- package/docs/icons/icon-json.dsds.yaml +36 -0
- package/docs/icons/icon-launch.dsds.yaml +34 -0
- package/docs/icons/icon-leave.dsds.yaml +35 -0
- package/docs/icons/icon-lemon.dsds.yaml +18 -0
- package/docs/icons/icon-link-removed.dsds.yaml +30 -0
- package/docs/icons/icon-link.dsds.yaml +36 -0
- package/docs/icons/icon-linkedin.dsds.yaml +14 -0
- package/docs/icons/icon-list.dsds.yaml +14 -0
- package/docs/icons/icon-lock.dsds.yaml +39 -0
- package/docs/icons/icon-logo-js.dsds.yaml +18 -0
- package/docs/icons/icon-logo-ts.dsds.yaml +18 -0
- package/docs/icons/icon-marker-removed.dsds.yaml +14 -0
- package/docs/icons/icon-marker.dsds.yaml +14 -0
- package/docs/icons/icon-master-detail.dsds.yaml +28 -0
- package/docs/icons/icon-menu.dsds.yaml +40 -0
- package/docs/icons/icon-microphone-slash.dsds.yaml +14 -0
- package/docs/icons/icon-microphone.dsds.yaml +14 -0
- package/docs/icons/icon-mobile-device.dsds.yaml +32 -0
- package/docs/icons/icon-moon.dsds.yaml +30 -0
- package/docs/icons/icon-number.dsds.yaml +30 -0
- package/docs/icons/icon-ok-hand.dsds.yaml +18 -0
- package/docs/icons/icon-olist.dsds.yaml +36 -0
- package/docs/icons/icon-overage.dsds.yaml +42 -0
- package/docs/icons/icon-package.dsds.yaml +34 -0
- package/docs/icons/icon-panel-left.dsds.yaml +38 -0
- package/docs/icons/icon-panel-right.dsds.yaml +40 -0
- package/docs/icons/icon-pause.dsds.yaml +32 -0
- package/docs/icons/icon-pin-filled.dsds.yaml +28 -0
- package/docs/icons/icon-pin-removed.dsds.yaml +14 -0
- package/docs/icons/icon-pin.dsds.yaml +32 -0
- package/docs/icons/icon-play.dsds.yaml +32 -0
- package/docs/icons/icon-plug.dsds.yaml +35 -0
- package/docs/icons/icon-presentation.dsds.yaml +18 -0
- package/docs/icons/icon-progress50.dsds.yaml +14 -0
- package/docs/icons/icon-progress75.dsds.yaml +14 -0
- package/docs/icons/icon-projects.dsds.yaml +14 -0
- package/docs/icons/icon-publish.dsds.yaml +38 -0
- package/docs/icons/icon-read-only.dsds.yaml +36 -0
- package/docs/icons/icon-redo.dsds.yaml +38 -0
- package/docs/icons/icon-refresh.dsds.yaml +38 -0
- package/docs/icons/icon-remove-circle.dsds.yaml +14 -0
- package/docs/icons/icon-remove.dsds.yaml +30 -0
- package/docs/icons/icon-reset.dsds.yaml +40 -0
- package/docs/icons/icon-restore.dsds.yaml +45 -0
- package/docs/icons/icon-retrieve.dsds.yaml +14 -0
- package/docs/icons/icon-retry.dsds.yaml +14 -0
- package/docs/icons/icon-revert.dsds.yaml +14 -0
- package/docs/icons/icon-robot.dsds.yaml +17 -0
- package/docs/icons/icon-rocket.dsds.yaml +34 -0
- package/docs/icons/icon-schema.dsds.yaml +36 -0
- package/docs/icons/icon-search.dsds.yaml +34 -0
- package/docs/icons/icon-select.dsds.yaml +38 -0
- package/docs/icons/icon-share.dsds.yaml +36 -0
- package/docs/icons/icon-sort.dsds.yaml +40 -0
- package/docs/icons/icon-sparkle.dsds.yaml +26 -0
- package/docs/icons/icon-sparkles.dsds.yaml +34 -0
- package/docs/icons/icon-spinner.dsds.yaml +38 -0
- package/docs/icons/icon-split-horizontal.dsds.yaml +32 -0
- package/docs/icons/icon-split-vertical.dsds.yaml +30 -0
- package/docs/icons/icon-square.dsds.yaml +18 -0
- package/docs/icons/icon-stack-compact.dsds.yaml +30 -0
- package/docs/icons/icon-stack.dsds.yaml +44 -0
- package/docs/icons/icon-star-filled.dsds.yaml +48 -0
- package/docs/icons/icon-star.dsds.yaml +51 -0
- package/docs/icons/icon-stop.dsds.yaml +32 -0
- package/docs/icons/icon-strikethrough.dsds.yaml +28 -0
- package/docs/icons/icon-string.dsds.yaml +38 -0
- package/docs/icons/icon-sun.dsds.yaml +30 -0
- package/docs/icons/icon-sync.dsds.yaml +36 -0
- package/docs/icons/icon-tablet-device.dsds.yaml +30 -0
- package/docs/icons/icon-tag.dsds.yaml +32 -0
- package/docs/icons/icon-tags.dsds.yaml +36 -0
- package/docs/icons/icon-target.dsds.yaml +14 -0
- package/docs/icons/icon-task.dsds.yaml +30 -0
- package/docs/icons/icon-terminal.dsds.yaml +30 -0
- package/docs/icons/icon-text.dsds.yaml +32 -0
- package/docs/icons/icon-th-large.dsds.yaml +34 -0
- package/docs/icons/icon-th-list.dsds.yaml +30 -0
- package/docs/icons/icon-thumbs-down.dsds.yaml +27 -0
- package/docs/icons/icon-thumbs-up.dsds.yaml +30 -0
- package/docs/icons/icon-tiers.dsds.yaml +18 -0
- package/docs/icons/icon-timeline.dsds.yaml +32 -0
- package/docs/icons/icon-toggle-arrow-right.dsds.yaml +39 -0
- package/docs/icons/icon-token.dsds.yaml +30 -0
- package/docs/icons/icon-transfer.dsds.yaml +32 -0
- package/docs/icons/icon-translate.dsds.yaml +32 -0
- package/docs/icons/icon-trash.dsds.yaml +34 -0
- package/docs/icons/icon-trend-upward.dsds.yaml +42 -0
- package/docs/icons/icon-triangle-outline.dsds.yaml +18 -0
- package/docs/icons/icon-trolley.dsds.yaml +18 -0
- package/docs/icons/icon-truncate.dsds.yaml +18 -0
- package/docs/icons/icon-twitter.dsds.yaml +18 -0
- package/docs/icons/icon-ulist.dsds.yaml +36 -0
- package/docs/icons/icon-unarchive.dsds.yaml +32 -0
- package/docs/icons/icon-underline.dsds.yaml +28 -0
- package/docs/icons/icon-undo.dsds.yaml +34 -0
- package/docs/icons/icon-unknown.dsds.yaml +36 -0
- package/docs/icons/icon-unlink.dsds.yaml +32 -0
- package/docs/icons/icon-unlock.dsds.yaml +41 -0
- package/docs/icons/icon-unpublish.dsds.yaml +38 -0
- package/docs/icons/icon-upload.dsds.yaml +40 -0
- package/docs/icons/icon-user.dsds.yaml +34 -0
- package/docs/icons/icon-users.dsds.yaml +34 -0
- package/docs/icons/icon-versions.dsds.yaml +14 -0
- package/docs/icons/icon-video.dsds.yaml +32 -0
- package/docs/icons/icon-warning-filled.dsds.yaml +14 -0
- package/docs/icons/icon-warning-outline.dsds.yaml +38 -0
- package/docs/icons/icon-wrench.dsds.yaml +18 -0
- package/docs/icons.dsds.yaml +768 -0
- package/docs/index.dsds.yaml +506 -0
- package/docs/overview/api-essentials.dsds.yaml +221 -0
- package/docs/overview/component-reference.dsds.yaml +213 -0
- package/docs/overview/installation.dsds.yaml +254 -0
- package/docs/overview/quick-start.dsds.yaml +317 -0
- package/docs/patterns/confirmation-dialogs.dsds.yaml +140 -0
- package/docs/patterns/error-messaging.dsds.yaml +58 -0
- package/docs/patterns/forms.dsds.yaml +362 -0
- package/docs/patterns/layouts.dsds.yaml +403 -0
- package/docs/patterns/loading-states.dsds.yaml +41 -0
- package/docs/patterns/messaging.dsds.yaml +72 -0
- package/docs/patterns/navigation.dsds.yaml +153 -0
- package/docs/patterns/responsive.dsds.yaml +590 -0
- package/docs/tokens/color.dsds.yaml +1158 -0
- package/docs/tokens/container-widths.dsds.yaml +131 -0
- package/docs/tokens/content.dsds.yaml +258 -0
- package/docs/tokens/content.tokens.json +180 -0
- package/docs/tokens/dtcg/README.md +41 -0
- package/docs/tokens/dtcg/css/color.css +107 -0
- package/docs/tokens/dtcg/css/container.css +12 -0
- package/docs/tokens/dtcg/css/fontFamily.css +10 -0
- package/docs/tokens/dtcg/css/fontWeight.css +10 -0
- package/docs/tokens/dtcg/css/index.css +12 -0
- package/docs/tokens/dtcg/css/radius.css +14 -0
- package/docs/tokens/dtcg/css/semantic.css +42 -0
- package/docs/tokens/dtcg/css/shadow.css +22 -0
- package/docs/tokens/dtcg/css/space.css +16 -0
- package/docs/tokens/dtcg/css/typography.css +67 -0
- package/docs/tokens/dtcg/json/color.tokens.json +911 -0
- package/docs/tokens/dtcg/json/container.tokens.json +44 -0
- package/docs/tokens/dtcg/json/fontFamily.tokens.json +10 -0
- package/docs/tokens/dtcg/json/fontWeight.tokens.json +18 -0
- package/docs/tokens/dtcg/json/radius.tokens.json +58 -0
- package/docs/tokens/dtcg/json/semantic.tokens.json +372 -0
- package/docs/tokens/dtcg/json/shadow.tokens.json +599 -0
- package/docs/tokens/dtcg/json/space.tokens.json +72 -0
- package/docs/tokens/dtcg/json/typography.tokens.json +354 -0
- package/docs/tokens/font-family.dsds.yaml +79 -0
- package/docs/tokens/font-weight.dsds.yaml +103 -0
- package/docs/tokens/radius.dsds.yaml +153 -0
- package/docs/tokens/semantic.dsds.yaml +397 -0
- package/docs/tokens/shadow.dsds.yaml +125 -0
- package/docs/tokens/space.dsds.yaml +185 -0
- package/docs/tokens/typography.dsds.yaml +316 -0
- package/llms.txt +108 -0
- package/package.json +6 -3
- package/skills/sanity-ui-5/SKILL.md +158 -0
- package/skills/sanity-ui-5/references/component-choice.md +37 -0
- package/skills/sanity-ui-5/references/components.md +145 -0
- package/skills/sanity-ui-5/references/forms-and-accessibility.md +189 -0
- package/skills/sanity-ui-5/references/migrating-from-v3.md +250 -0
- package/skills/sanity-ui-5/references/props-and-imports.md +169 -0
- package/skills/sanity-ui-5/references/setup.md +177 -0
- package/skills/sanity-ui-5/references/silent-failures.md +33 -0
- package/skills/sanity-ui-5/references/taste.md +53 -0
- package/skills/sanity-ui-5/references/tone-and-color.md +55 -0
- package/src/components/button/Button.tsx +14 -3
- package/src/components/button/button.css +23 -25
- package/src/components/button/button.props.ts +4 -0
- package/src/components/code/code.props.ts +3 -2
- package/src/components/eyebrow/Eyebrow.tsx +8 -3
- package/src/components/eyebrow/eyebrow.props.ts +10 -2
- package/src/components/heading/Heading.tsx +1 -1
- package/src/components/heading/heading.props.ts +4 -3
- package/src/components/popover/Popover.tsx +4 -3
- package/src/components/popover/popover.css +5 -3
- package/src/components/popover/popover.props.ts +9 -0
- package/src/components/text/text.props.ts +6 -1
- package/src/css/classes/system/typography.css +6 -6
- package/src/css/tokens/semantic.css +7 -7
- package/src/props/typography.ts +1 -5
- package/src/version.ts +2 -2
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
kind: sanity.foundation
|
|
2
|
+
id: typography-guidelines
|
|
3
|
+
name: Typography guidelines
|
|
4
|
+
description: Rules and conventions for applying Sanity UI's type scale, components, hierarchy, and reading mechanics across product interfaces.
|
|
5
|
+
metadata:
|
|
6
|
+
tags:
|
|
7
|
+
- concept
|
|
8
|
+
- typography
|
|
9
|
+
- type scale
|
|
10
|
+
- hierarchy
|
|
11
|
+
- readability
|
|
12
|
+
- heading
|
|
13
|
+
- text
|
|
14
|
+
- eyebrow
|
|
15
|
+
- code
|
|
16
|
+
- weight
|
|
17
|
+
- alignment
|
|
18
|
+
- Heading
|
|
19
|
+
- Text
|
|
20
|
+
- Code
|
|
21
|
+
- FontWeight
|
|
22
|
+
- line height
|
|
23
|
+
- measure
|
|
24
|
+
status:
|
|
25
|
+
status: stable
|
|
26
|
+
sections:
|
|
27
|
+
- kind: guidelines
|
|
28
|
+
for: all
|
|
29
|
+
title: Principles
|
|
30
|
+
items:
|
|
31
|
+
- level: should
|
|
32
|
+
statement: Proportional. Hierarchy comes from the ratio between steps, not from raw pixel values. The scale sets the proportions. You choose a step; the rendered size follows.
|
|
33
|
+
- level: should
|
|
34
|
+
statement: Restrained. Most pages need three or four roles, not eight. Fewer sizes and fewer weights make hierarchy clearer. Reach for weight and space before adding a new size.
|
|
35
|
+
- level: should
|
|
36
|
+
statement: Meaning before look. A heading's level marks structure; its size sets appearance. Keep the two apart, and the outline stays correct at any size.
|
|
37
|
+
- level: should
|
|
38
|
+
statement: Conventional. Start alignment, sentence case, and a small weight set follow patterns readers already know. Vary only with a clear reason.
|
|
39
|
+
- kind: guidelines
|
|
40
|
+
for: all
|
|
41
|
+
framing: how-to-use
|
|
42
|
+
items:
|
|
43
|
+
- refs:
|
|
44
|
+
- to: semantics#heading-level-from-outline
|
|
45
|
+
rel: same-as
|
|
46
|
+
- refs:
|
|
47
|
+
- to: semantics#heading-levels-sequential
|
|
48
|
+
rel: same-as
|
|
49
|
+
- level: should
|
|
50
|
+
statement: Build hierarchy with size and weight before adding color. Design the ranking in grayscale first, then add color as reinforcement.
|
|
51
|
+
- level: should-not
|
|
52
|
+
statement: Don't use all-caps for body text or long strings. It harms legibility and breaks rhythm.
|
|
53
|
+
- level: should-not
|
|
54
|
+
statement: Don't center body copy. It removes the consistent return edge the eye depends on.
|
|
55
|
+
- id: no-truncate-body-copy
|
|
56
|
+
level: must-not
|
|
57
|
+
statement: Don't truncate paragraph text. Clipping changes meaning. Reserve `truncate` for metadata and support labels.
|
|
58
|
+
checks:
|
|
59
|
+
- href: ../evals/cases.yaml
|
|
60
|
+
role: agent-test
|
|
61
|
+
checkedBy: assisted
|
|
62
|
+
$extensions:
|
|
63
|
+
io.jev:
|
|
64
|
+
type: boolean
|
|
65
|
+
- level: must-not
|
|
66
|
+
statement: Don't use icons in place of text for complex or critical content. An icon with no text equivalent is invisible to screen readers.
|
|
67
|
+
- id: don-emoji-text-screen-readers
|
|
68
|
+
level: must-not
|
|
69
|
+
statement: Don't use emoji in UI text. Screen readers announce emoji descriptions verbatim, which breaks reading flow. Emoji also render differently across platforms and break typographic consistency.
|
|
70
|
+
- kind: guidelines
|
|
71
|
+
for: all
|
|
72
|
+
title: Applying type in practice
|
|
73
|
+
items:
|
|
74
|
+
- level: should
|
|
75
|
+
statement: 'Focus on visual and semantic hierarchy: use size, weight, and lightness to direct attention effectively, so the structure helps people understand what to focus on.'
|
|
76
|
+
- level: should-not
|
|
77
|
+
statement: 'Let the content speak for itself: avoid type treatments such as accent colors, extreme sizes, dead-center alignment, or all caps to drive engagement or attention.'
|
|
78
|
+
- level: should-not
|
|
79
|
+
statement: 'Truncation is not a substitute for concise writing: truncating text harms comprehension, and succinct copywriting is always a better solution than hiding text.'
|
|
80
|
+
- kind: guidelines
|
|
81
|
+
for: agent
|
|
82
|
+
framing: how-to-use
|
|
83
|
+
items:
|
|
84
|
+
- level: must-not
|
|
85
|
+
statement: Never add letter spacing to lowercase text; it breaks word recognition.
|
|
86
|
+
- kind: section
|
|
87
|
+
for: all
|
|
88
|
+
freeform:
|
|
89
|
+
- title: Overview
|
|
90
|
+
body: |-
|
|
91
|
+
Type does two jobs at once. It carries words, and it ranks them before anyone reads. The typography system gives designers and developers a shared scale and a set of components for building ordered interfaces.
|
|
92
|
+
- kind: section
|
|
93
|
+
for: all
|
|
94
|
+
freeform:
|
|
95
|
+
- title: Fundamentals
|
|
96
|
+
body: |-
|
|
97
|
+
These describe how reading works. The rules in this document follow from them.
|
|
98
|
+
|
|
99
|
+
**Letters are recognized, not word shapes.** Legibility and readability solve different problems. Legibility asks if letters are distinct. Readability asks if the text flows.
|
|
100
|
+
|
|
101
|
+
**The eye jumps and pauses.** Reading moves in saccades (jumps) and fixations (pauses), with a return sweep at each line end. Erratic spacing or a missing left edge breaks that rhythm and slows reading.
|
|
102
|
+
|
|
103
|
+
**Measure governs readability.** Line length controls whether the eye finds the next line. Long lines lose the return sweep. Short lines break rhythm. The workable range spans roughly 45–75 characters.
|
|
104
|
+
|
|
105
|
+
**Vertical rhythm aids scanning.** Even line spacing makes a text block feel like a system. It gives the eye a steady cadence.
|
|
106
|
+
|
|
107
|
+
**Type ranks content before it is read.** Size, weight, and spacing assign rank at a glance. Hierarchy is the first thing type conveys.
|
|
108
|
+
|
|
109
|
+
**Hierarchy lives in lightness, not hue.** Size, weight, and space rank content for every viewer. Hierarchy built on color alone fails in grayscale and for people with low vision.
|
|
110
|
+
- kind: section
|
|
111
|
+
for: all
|
|
112
|
+
freeform:
|
|
113
|
+
- title: Components
|
|
114
|
+
body: |-
|
|
115
|
+
**Heading** renders `h1`–`h6` elements. Use it for page titles, section headings, and inspector headers. Always set the heading level with `as`.
|
|
116
|
+
|
|
117
|
+
**Text** renders inline elements. Use it for body copy, captions, labels, and all support text.
|
|
118
|
+
|
|
119
|
+
**Form labels** use `Text` with `as="label"`, which renders as a native `<label>`. Use it for the label in a form field.
|
|
120
|
+
|
|
121
|
+
**Code** renders inline or block code. Use it for code samples, identifiers, and inline tokens. `Code` does not accept an `align` prop — it inherits block flow.
|
|
122
|
+
- title: Choosing between Heading and Text
|
|
123
|
+
body: |-
|
|
124
|
+
- Use `Heading` when the text names a section of the page outline.
|
|
125
|
+
- Use `Text` for body copy and for UI text that is not a heading.
|
|
126
|
+
- Use `Text` with `as="label"` for the visible name of a TextInput, Select or other input.
|
|
127
|
+
- A dense panel text element that does not belong in the outline is `Text 1`, not `Heading 0`.
|
|
128
|
+
- kind: section
|
|
129
|
+
for: all
|
|
130
|
+
freeform:
|
|
131
|
+
- title: Typefaces
|
|
132
|
+
body: |-
|
|
133
|
+
**Inter** is the primary typeface. All content, UI controls, and inputs use it. Sanity UI enables these font features:
|
|
134
|
+
|
|
135
|
+
| Feature | Code | Purpose |
|
|
136
|
+
| --- | --- | --- |
|
|
137
|
+
| Disambiguation | `ss02` | Renders 0, I, l, and ß in distinct alternate forms. |
|
|
138
|
+
| Discretionary ligatures | `dlig` | Joins common letter pairs (ff, fi, ft, tt, and others) for smoother reading. |
|
|
139
|
+
| Tabular numbers | `tnum` | Fixed-width numerals. Use only inside tables. |
|
|
140
|
+
|
|
141
|
+
**Code** uses the operating system's default monospace:
|
|
142
|
+
|
|
143
|
+
| OS | Typeface |
|
|
144
|
+
| --- | --- |
|
|
145
|
+
| macOS | SF Mono |
|
|
146
|
+
| Windows | Consolas / Courier New |
|
|
147
|
+
| Ubuntu / GNOME | Ubuntu Mono |
|
|
148
|
+
| Fedora / Debian | DejaVu Sans Mono |
|
|
149
|
+
- kind: section
|
|
150
|
+
for: all
|
|
151
|
+
freeform:
|
|
152
|
+
- title: Type hierarchy
|
|
153
|
+
body: |-
|
|
154
|
+
Map each role to a component, size, and weight. Most pages use three or four of these. The table is the available set, not a checklist — fewer roles means clearer hierarchy.
|
|
155
|
+
|
|
156
|
+
| Role | Component | Size | Weight |
|
|
157
|
+
| --- | --- | --- | --- |
|
|
158
|
+
| Page title | `Heading` | `3` | bold |
|
|
159
|
+
| Section title | `Heading` | `2` | bold |
|
|
160
|
+
| Sidebar / inspector title | `Heading` | `1` | semibold |
|
|
161
|
+
| Dense panel title | `Heading` | `0` | semibold |
|
|
162
|
+
| Categorize or contextualize a title | `Eyebrow` | Size relative to Heading | semibold |
|
|
163
|
+
| Body copy | `Text` | `2` | regular |
|
|
164
|
+
| UI text elements (buttons, menus, tabs) | `Text` | `1` | medium |
|
|
165
|
+
| Captions, metadata | `Text` | `0` | medium |
|
|
166
|
+
| Form labels | `Text` with `as="label"` | `1` | none |
|
|
167
|
+
|
|
168
|
+
Form labels set with `Text` use `size={1}`, which renders at {body-1}.
|
|
169
|
+
|
|
170
|
+
Captions and metadata use `Text 0`. Reach for `Text 1` only when the caption sits next to body copy and must hold its own.
|
|
171
|
+
- kind: section
|
|
172
|
+
for: all
|
|
173
|
+
freeform:
|
|
174
|
+
- title: Scale
|
|
175
|
+
body: The scale is a set of proportions, not hand-set sizes. Choose a step; the rendered size and line height come from its token. The default theme exposes no single clean modular ratio across the steps. Design with the steps, not one multiplier.
|
|
176
|
+
- title: Heading scale
|
|
177
|
+
body: |-
|
|
178
|
+
Sizes `0` through `5`. Each size's line height comes with its token.
|
|
179
|
+
|
|
180
|
+
| Size | Token | Common use |
|
|
181
|
+
| --- | --- | --- |
|
|
182
|
+
| `0` | {heading-0} | UI chrome — toolbars, sidebars, dense panels |
|
|
183
|
+
| `1` | {heading-1} | Sub-section titles |
|
|
184
|
+
| `2` **(default)** | {heading-2} | Standard section headings |
|
|
185
|
+
| `3` | {heading-3} | Document titles in high-density layouts |
|
|
186
|
+
| `4` | {heading-4} | Document titles in medium-density layouts |
|
|
187
|
+
| `5` | {heading-5} | Document titles in low-density layouts |
|
|
188
|
+
- title: Text scale
|
|
189
|
+
body: |-
|
|
190
|
+
Sizes `0` through `4`. Sizes `3` and `4` serve display purposes only — hero and empty-state text, not product chrome. Each size's line height comes with its token.
|
|
191
|
+
|
|
192
|
+
| Size | Token | Common use |
|
|
193
|
+
| --- | --- | --- |
|
|
194
|
+
| `0` | {body-0} | Fine print, metadata |
|
|
195
|
+
| `1` | {body-1} | UI labels, buttons, menu items, tabs |
|
|
196
|
+
| `2` **(default)** | {body-2} | Body copy |
|
|
197
|
+
| `3` | {body-3} | Display body — intros and lead paragraphs |
|
|
198
|
+
| `4` | {body-4} | Display body — hero and empty-state text |
|
|
199
|
+
- title: Eyebrow and Code scale
|
|
200
|
+
body: '`Code` runs sizes `0` through `4`, defaulting to `2`: {code-0}, {code-1}, {code-2}, {code-3} and {code-4}. `Eyebrow` runs sizes `0` through `4`: {eyebrow-0}, {eyebrow-1}, {eyebrow-2}, {eyebrow-3} and {eyebrow-4}.'
|
|
201
|
+
- kind: section
|
|
202
|
+
for: all
|
|
203
|
+
freeform:
|
|
204
|
+
- title: Measure
|
|
205
|
+
body: 'Constrain body text to roughly 45–75 characters per line. Start with `max-inline-size: 66ch`. The `ch` unit approximates character count from the `0` glyph width, so treat 66ch as a target. Check that the rendered line lands in the 45–75 range, above all for `Code` or when the font changes. Outside this range, the return sweep fails and reading slows. Measure delivers more readability gain than any other single factor.'
|
|
206
|
+
- title: Line height
|
|
207
|
+
body: |-
|
|
208
|
+
Body text needs ample line height: 1.5×. This also gives the layout headroom for the WCAG 1.4.12 text-spacing override, where users force 1.5× line height (see Accessibility). Headings and eyebrows use a tighter 1.15× at every size. Longer lines need more leading.
|
|
209
|
+
|
|
210
|
+
| Tokens | Components | Line height |
|
|
211
|
+
| --- | --- | --- |
|
|
212
|
+
| `body-0`–`body-4` | `Text` 0–4 | 1.5× |
|
|
213
|
+
| `code-0`–`code-4` | `Code` 0–4 | 1.5× |
|
|
214
|
+
| `heading-0`–`heading-5` | `Heading` 0–5 | 1.25× |
|
|
215
|
+
| `eyebrow-0`–`eyebrow-4` | `Eyebrow` 0–4 | 1.15× |
|
|
216
|
+
|
|
217
|
+
The values come from `tokens/dtcg/json/typography.tokens.json`.
|
|
218
|
+
- title: Alignment
|
|
219
|
+
body: |-
|
|
220
|
+
Start-align body text by default. Left-aligned text in left-to-right scripts gives the eye a consistent return edge and supports readers with dyslexia.
|
|
221
|
+
|
|
222
|
+
Center alignment works for short, standalone strings — empty-state headings and modal titles. Center body copy never.
|
|
223
|
+
|
|
224
|
+
End alignment suits numeric content. Numerals align on the right edge, so columns of figures compare at a glance. Use it for numbers in tables.
|
|
225
|
+
|
|
226
|
+
Justified text creates uneven word spacing. It breaks the consistent return edge the eye depends on. Avoid it in interfaces.
|
|
227
|
+
|
|
228
|
+
Alignment applies to `Heading`, `Text`, and `Eyebrow`. `Code` has no `align` prop.
|
|
229
|
+
- kind: section
|
|
230
|
+
for: all
|
|
231
|
+
freeform:
|
|
232
|
+
- title: Weight
|
|
233
|
+
body: |-
|
|
234
|
+
Weight creates emphasis. Many weights at one level cancel the effect. `FontWeight` holds four values. What each weight is for is in the Font weight entry's table (`font-weight`).
|
|
235
|
+
|
|
236
|
+
- kind: section
|
|
237
|
+
for: all
|
|
238
|
+
freeform:
|
|
239
|
+
- title: Typographic conventions
|
|
240
|
+
body: |-
|
|
241
|
+
Typography owns how letters and numerals are rendered — small caps, figure style, letter spacing, line breaks. The Content guidelines own which words, casing, and numerals get written. When both touch a string, content decides the characters; typography decides the look.
|
|
242
|
+
|
|
243
|
+
**Acronyms and abbreviations.** Whether to use an acronym, and how to capitalize it, is a content decision. The Content guidelines keep short forms like CSV, JSON, and URL in their own casing. For rendering: the default Sanity UI type stack does not expose small caps. Set acronyms in full uppercase with a little letter spacing, which keeps the rhythm. A font with small-cap OpenType features reads better in spaced small caps. Confirm support with the frontend team first.
|
|
244
|
+
|
|
245
|
+
**Figures.** Use lining figures (titling numerals) everywhere by default. The Sanity UI default stack does not ship oldstyle figures. If the active font exposes oldstyle (text) figures, use them in body copy. Keep lining figures for tables and all-caps strings, where column alignment matters. This rule is about numeral style. Whether to write a numeral or spell a number out is a content decision. The Content guidelines call for figures over words in counts ("Delete 3 items").
|
|
246
|
+
|
|
247
|
+
**Letter spacing.** Add a little letter spacing to the all-caps strings and acronyms that remain. Use them with restraint — see the Don'ts below and the Content guidelines. Add letter spacing to lowercase text never. It breaks word recognition.
|
|
248
|
+
|
|
249
|
+
**Numbers and units.** Join a number and its unit with a non-breaking space (` `). This stops the value and unit from splitting across lines: `10 MB`, not `10<br>MB`. This matches the Content guidelines' file-size example ("Try a file under 10 MB").
|
|
250
|
+
|
|
251
|
+
Sentence-level format — sentence case, one space between sentences, the Oxford comma — lives in the Content guidelines. This doc defers to it for casing.
|
|
252
|
+
- kind: section
|
|
253
|
+
for: all
|
|
254
|
+
freeform:
|
|
255
|
+
- title: Vertical rhythm and the trim prop
|
|
256
|
+
body: |-
|
|
257
|
+
A line of text carries space above and below its glyphs that the glyphs themselves don't use — the font's built-in ascender and descender space. That space is what makes multi-line text comfortable to read, but it also makes a text component's box taller than what the eye reads as "the text." Compare that against padding, a `gap`, or a border, and the visible space ends up larger than the spacing scale value says — a `gap` of `3` ({space-3}) next to an untrimmed `Heading` can read closer to {space-4} once the font's leading is added on top.
|
|
258
|
+
|
|
259
|
+
`trim` removes that mismatch. Set `trim` on `Heading`, `Text`, `Eyebrow`, or `Code` to collapse the invisible leading above and below the text, so the rendered box hugs the visible glyphs instead of the font's full line-height. The correction is sized per step — larger sizes carry more leading, so they get a larger adjustment:
|
|
260
|
+
|
|
261
|
+
| Component | Size | Trim adjustment |
|
|
262
|
+
| :---- | :---- | :---- |
|
|
263
|
+
| `Heading` | `0` | −4px |
|
|
264
|
+
| `Heading` | `1` | −5px |
|
|
265
|
+
| `Heading` | `2` | −6px |
|
|
266
|
+
| `Heading` | `3` | −7px |
|
|
267
|
+
| `Heading` | `4` | −8px |
|
|
268
|
+
| `Heading` | `5` | −10px |
|
|
269
|
+
| `Text` / `Code` | `0` | −4px |
|
|
270
|
+
| `Text` / `Code` | `1` | −5px |
|
|
271
|
+
| `Text` / `Code` | `2` | −6px |
|
|
272
|
+
| `Text` / `Code` | `3` | −7px |
|
|
273
|
+
| `Text` / `Code` | `4` | −8px |
|
|
274
|
+
| `Eyebrow` | `0` | −2px |
|
|
275
|
+
| `Eyebrow` | `1` | −2.5px |
|
|
276
|
+
| `Eyebrow` | `2` | −3px |
|
|
277
|
+
| `Eyebrow` | `3` | −3.5px |
|
|
278
|
+
| `Eyebrow` | `4` | −4px |
|
|
279
|
+
| `Eyebrow` | `5` | −4.5px |
|
|
280
|
+
|
|
281
|
+
`Eyebrow` trim values were added in 5.0.0-alpha.20.
|
|
282
|
+
|
|
283
|
+
`trim` defaults to off. Turn it on deliberately, not as a habit.
|
|
284
|
+
|
|
285
|
+
**When to use it.** Reach for `trim` whenever a text element's spacing needs to line up exactly with something else: a `Heading` or `Text` sitting directly against a Card's padding, a short title or label next to an icon or avatar sharing a baseline or center line, or any place a `gap` value from the spacing scale needs to be the true visual distance to a neighbor.
|
|
286
|
+
|
|
287
|
+
**When not to use it.** Leave `trim` off for running text — paragraphs, multi-line body copy, anything meant to read normally. The leading `trim` removes is the same leading that keeps multi-line text comfortable. Default to no `trim`, and reach for it only when a specific alignment problem shows up. See Spacing → Vertical rhythm for how this interacts with the spacing scale.
|
|
288
|
+
|
|
289
|
+
**Trim and truncate together.** Setting both `trim` and `truncate` on the same `Heading`, `Text`, or `Eyebrow` works, but the component changes shape to do it — the truncation logic moves to an inner wrapping element, while the outer element carries the trim adjustment. Expect an additional wrapping element in the rendered DOM when both props are set together that isn't there when only one is.
|
|
290
|
+
- title: Truncation
|
|
291
|
+
body: '`Heading`, `Text`, and `Eyebrow` accept a `truncate` prop that limits text to a set line count. `truncate={1}` clips to one line with an ellipsis; higher values clamp to that many lines. Use it for metadata and support labels. Use it as a last resort — succinct copy is always better than hidden text. Never apply it to critical actions or nav items.'
|
|
292
|
+
- kind: section
|
|
293
|
+
for: all
|
|
294
|
+
freeform:
|
|
295
|
+
- title: Related
|
|
296
|
+
body: |-
|
|
297
|
+
- **Content guidelines** — casing, acronym use, numerals as words vs. figures, sentence-level format.
|
|
298
|
+
- **Color guidelines** — contrast, grayscale hierarchy, semantic tone.
|
|
299
|
+
- **Spacing guidelines** — the spacing scale and vertical rhythm.
|
|
300
|
+
- **Accessibility** — resize, reflow, text-spacing overrides, contrast, full code.
|
|
301
|
+
- kind: section
|
|
302
|
+
for: all
|
|
303
|
+
freeform:
|
|
304
|
+
- title: Checklist
|
|
305
|
+
body: |-
|
|
306
|
+
Before finalizing any text treatment:
|
|
307
|
+
|
|
308
|
+
- [ ] Every size comes from the scale?
|
|
309
|
+
- [ ] Hierarchy uses the fewest sizes, leaning on weight and space first?
|
|
310
|
+
- [ ] Body measure within 45–75 characters?
|
|
311
|
+
- [ ] Line height set for this size and measure, aligned to the spacing rhythm?
|
|
312
|
+
- [ ] Body copy start-aligned?
|
|
313
|
+
- [ ] Heading levels match the page outline, not the visual size?
|
|
314
|
+
- [ ] Acronyms checked against the Content guidelines, then rendered in uppercase or letter-spaced?
|
|
315
|
+
- [ ] Hierarchy holds in grayscale?
|
|
316
|
+
- [ ] Every text/background pair meets WCAG 2.2 AA contrast, in light and dark (see the Accessibility guidelines)?
|
|
317
|
+
- [ ] Text resizes to 200% and reflows to 320px (see Accessibility)?
|
|
318
|
+
- kind: section
|
|
319
|
+
for: agent
|
|
320
|
+
freeform:
|
|
321
|
+
- title: Intent
|
|
322
|
+
body: Use this guide to apply Sanity UI's type scale and components correctly, enforce heading structure, and uphold readability and accessibility conventions in any interface that renders text.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-access-denied
|
|
3
|
+
name: AccessDeniedIcon
|
|
4
|
+
description: Indicates access restrictions or permissions denial.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Forbidden
|
|
10
|
+
- No Entry
|
|
11
|
+
- Restricted
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/access-denied.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: Use when a user lacks permission to access content or features
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: For errors that aren't related to user permissions. Use ErrorOutlineIcon or ErrorFilledIcon instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-error-outline
|
|
31
|
+
- to: icon-error-filled
|
|
32
|
+
- level: should-not
|
|
33
|
+
statement: For warnings that aren't related to user permissions. Use WarningOutlineIcon or WarningFilledIcon instead.
|
|
34
|
+
alternatives:
|
|
35
|
+
- to: icon-warning-outline
|
|
36
|
+
- to: icon-warning-filled
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: To represent an action to gain access. Use LockIcon instead.
|
|
39
|
+
alternatives:
|
|
40
|
+
- to: icon-lock
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-activity
|
|
3
|
+
name: ActivityIcon
|
|
4
|
+
description: Represents activity feeds, monitoring, or diagnostics.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Feed
|
|
10
|
+
- Timeline
|
|
11
|
+
- EKG
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/activity.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: For activity logs or feeds.
|
|
27
|
+
- level: should
|
|
28
|
+
statement: For performance or health checks.
|
|
29
|
+
- level: should-not
|
|
30
|
+
statement: For general analytics or data visualization tools. Use BarChartIcon instead.
|
|
31
|
+
alternatives:
|
|
32
|
+
- to: icon-bar-chart
|
|
33
|
+
- level: should-not
|
|
34
|
+
statement: To represent usage or a general line chart. Use ChartUpwardIcon instead.
|
|
35
|
+
alternatives:
|
|
36
|
+
- to: icon-chart-upward
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: To represent a trend in data. Use TrendUpwardIcon instead.
|
|
39
|
+
alternatives:
|
|
40
|
+
- to: icon-trend-upward
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add-circle
|
|
3
|
+
name: AddCircleIcon
|
|
4
|
+
description: The add circle icon from the Sanity icon set.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
refs:
|
|
9
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add-circle.svg
|
|
10
|
+
rel: source
|
|
11
|
+
$extensions:
|
|
12
|
+
com.sanity.ui:
|
|
13
|
+
iconOf: icons
|
|
14
|
+
described: false
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add-comment
|
|
3
|
+
name: AddCommentIcon
|
|
4
|
+
description: To provide an affordance for adding a comment or reply.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Comment Add
|
|
10
|
+
- New Comment
|
|
11
|
+
- Reply
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add-comment.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: To represent the ability to add a comment or reply to a thread. Especially when commenting is a secondary action.
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: To view comments. Use CommentIcon instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-comment
|
|
31
|
+
- level: should-not
|
|
32
|
+
statement: When commenting is the primary action within a feature. Consider AddIcon instead.
|
|
33
|
+
alternatives:
|
|
34
|
+
- to: icon-add
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add-document
|
|
3
|
+
name: AddDocumentIcon
|
|
4
|
+
description: Adding or creating a document.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- New document
|
|
10
|
+
refs:
|
|
11
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add-document.svg
|
|
12
|
+
rel: source
|
|
13
|
+
$extensions:
|
|
14
|
+
com.sanity.ui:
|
|
15
|
+
iconOf: icons
|
|
16
|
+
described: true
|
|
17
|
+
sections:
|
|
18
|
+
- kind: guidelines
|
|
19
|
+
for: all
|
|
20
|
+
framing: when-to-use
|
|
21
|
+
title: When to use
|
|
22
|
+
items:
|
|
23
|
+
- level: should
|
|
24
|
+
statement: For adding a document to a group/collection/list
|
|
25
|
+
- level: should
|
|
26
|
+
statement: For creating a new document as a secondary action
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: When adding/creating a document is the primary action. Use AddIcon instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-add
|
|
31
|
+
- level: should-not
|
|
32
|
+
statement: For general adding or creation. Use AddIcon instead.
|
|
33
|
+
alternatives:
|
|
34
|
+
- to: icon-add
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add-user
|
|
3
|
+
name: AddUserIcon
|
|
4
|
+
description: To add a role or add/invite users to a group.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
refs:
|
|
9
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add-user.svg
|
|
10
|
+
rel: source
|
|
11
|
+
$extensions:
|
|
12
|
+
com.sanity.ui:
|
|
13
|
+
iconOf: icons
|
|
14
|
+
described: true
|
|
15
|
+
sections:
|
|
16
|
+
- kind: guidelines
|
|
17
|
+
for: all
|
|
18
|
+
framing: when-to-use
|
|
19
|
+
title: When to use
|
|
20
|
+
items:
|
|
21
|
+
- level: should
|
|
22
|
+
statement: For adding people to a user group or a team
|
|
23
|
+
- level: should
|
|
24
|
+
statement: To add people to a permissions group
|
|
25
|
+
- level: should
|
|
26
|
+
statement: To add a role
|
|
27
|
+
- level: should-not
|
|
28
|
+
statement: As a general action for sharing. Use ShareIcon instead.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: icon-share
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-add
|
|
3
|
+
name: AddIcon
|
|
4
|
+
description: Adding a new or existing item to an element.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Plus
|
|
10
|
+
- Create
|
|
11
|
+
- New
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/add.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: 'Adding/creating a new item that doesn''t benefit from the specificity of an icon with an "add" modifier (example: add-document)'
|
|
27
|
+
- level: should
|
|
28
|
+
statement: As a button for the primary add/create action
|
|
29
|
+
- level: should
|
|
30
|
+
statement: As a button when only one type of content can be added
|
|
31
|
+
- level: should
|
|
32
|
+
statement: As a menu button to display the options of what type of item to add
|
|
33
|
+
- level: should-not
|
|
34
|
+
statement: When there are multiple add actions on a page. Use a more specific icon is available like AddCommentIcon for comments
|
|
35
|
+
- level: should-not
|
|
36
|
+
statement: To indicate showing UI columns/rows in the UI. Use split-horizontal or split-vertical instead.
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: To indicate inviting people/members to an organization or group. Use AddUserIcon instead.
|
|
39
|
+
alternatives:
|
|
40
|
+
- to: icon-add-user
|
|
41
|
+
- level: should-not
|
|
42
|
+
statement: 'For adding content in a list where position does matters. Use InsertAboveIcon or InsertBelowIcon instead. Best practices:'
|
|
43
|
+
alternatives:
|
|
44
|
+
- to: icon-insert-above
|
|
45
|
+
- to: icon-insert-below
|
|
46
|
+
- level: should-not
|
|
47
|
+
statement: Add a label with the icon when space permits.
|
|
48
|
+
- level: should-not
|
|
49
|
+
statement: 'When creating a new item, use "New [ITEM TYPE]". Example: "New document"'
|
|
50
|
+
- level: should-not
|
|
51
|
+
statement: 'When adding an existing item, use "Add [ITEM TYPE ]". Example: "Add tag".'
|
|
52
|
+
- level: should-not
|
|
53
|
+
statement: In cases where a label is not used, add a tooltip.
|
|
54
|
+
- level: should-not
|
|
55
|
+
statement: 'When creating a new item, use "Create a new [ITEM TYPE]". Example: "Create a new document"'
|
|
56
|
+
- level: should-not
|
|
57
|
+
statement: 'When adding an existing item, use "Add a [ITEM TYPE ]". Example: "Add a tag".'
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-api
|
|
3
|
+
name: ApiIcon
|
|
4
|
+
description: DECORATIVE. USE WITH DISCRETION. ONLY USE IF ANOTHER ICON DOES NOT FIT THE NEED.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Code Interface
|
|
10
|
+
- Integration
|
|
11
|
+
refs:
|
|
12
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/api.svg
|
|
13
|
+
rel: source
|
|
14
|
+
$extensions:
|
|
15
|
+
com.sanity.ui:
|
|
16
|
+
iconOf: icons
|
|
17
|
+
described: true
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: icon-archive
|
|
3
|
+
name: ArchiveIcon
|
|
4
|
+
description: Archiving or storing items for later reference.
|
|
5
|
+
metadata:
|
|
6
|
+
status:
|
|
7
|
+
status: stable
|
|
8
|
+
aliases:
|
|
9
|
+
- Box
|
|
10
|
+
- Storage
|
|
11
|
+
- Deprecated
|
|
12
|
+
refs:
|
|
13
|
+
- href: https://github.com/sanity-io/icons/blob/main/packages/icons/src/archive.svg
|
|
14
|
+
rel: source
|
|
15
|
+
$extensions:
|
|
16
|
+
com.sanity.ui:
|
|
17
|
+
iconOf: icons
|
|
18
|
+
described: true
|
|
19
|
+
sections:
|
|
20
|
+
- kind: guidelines
|
|
21
|
+
for: all
|
|
22
|
+
framing: when-to-use
|
|
23
|
+
title: When to use
|
|
24
|
+
items:
|
|
25
|
+
- level: should
|
|
26
|
+
statement: For archival actions
|
|
27
|
+
- level: should
|
|
28
|
+
statement: For stashing changes
|
|
29
|
+
- level: should-not
|
|
30
|
+
statement: For removal actions. Use RemoveIcon instead.
|
|
31
|
+
alternatives:
|
|
32
|
+
- to: icon-remove
|
|
33
|
+
- level: should-not
|
|
34
|
+
statement: For delete actions. Use TrashIcon instead.
|
|
35
|
+
alternatives:
|
|
36
|
+
- to: icon-trash
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: To represent adding to a collection. Use PackageIcon instead.
|
|
39
|
+
alternatives:
|
|
40
|
+
- to: icon-package
|
|
41
|
+
- level: should-not
|
|
42
|
+
statement: To represent download or export actions. Use DownloadIcon instead.
|
|
43
|
+
alternatives:
|
|
44
|
+
- to: icon-download
|