wbDesign Wiki
Storybook

Switch — Figma Assembly Rules

Скачать .md ↓
Angularatom

Status: active Figma assembly contract.

Scope

Use this contract when placing or revising the WB Logistics Switch in Figma. It governs the published component identity, exact instance properties, anatomy, and state assembly. Runtime form behavior remains in the UX spec.

Source Evidence

  • Switch UX spec.
  • Direct Figma evidence: the canonical component set listed below was verified.
  • Canonical Figma component set: 29798:428221, Switch-set, key c163954c79d3d6ccfee64612ea9fa07afefa708c.

Exact Component Properties

Use the property keys exactly as returned by componentPropertyDefinitions. Non-variant suffixes are generated Figma IDs and must not be shortened or guessed.

Exact key Type Default / values Assembly use
Hint#29799:0 Boolean false Keep off; the runtime component has no active hint API.
Description#29799:5 Boolean false Shows the existing description anatomy.
Label#29799:10 Boolean true Shows the label block.
Label text#29801:64 Text Label Sets the visible label.
Size Variant M - 24; S - 16 Use one of the published sizes.
Selected Variant off; on Represents the boolean value.
State Variant Normal; Hover; Disabled Use for the intended visual evidence state.

The component set exposes no verified top-level text property for the description copy. Do not invent a raw GUID. If an existing instance already contains a description-text override, preserve it and inspect that instance's descendant text layer before editing.

Required Assembly

  • Rule ID: switch.published — configure the canonical Switch-set through its exact properties; never draw or detach a local switch.
  • Import or reuse the component by canonical key; do not redraw the track, thumb, or label.
  • Set label visibility and copy through Label#29799:10 and Label text#29801:64.
  • Set value through Selected, size through Size, and preview state through State. Do not detach to recolor or reposition the thumb.
  • Keep Hint#29799:0=false. A hint visible in Figma would not map to the current wbl-switch implementation.
  • Preserve the library's track, thumb, typography, radius, color-variable, and motion bindings.

States

  • Normal off: Selected=off, State=Normal.
  • Normal on: Selected=on, State=Normal.
  • Disabled: use State=Disabled together with the intended selected value.
  • Hover is design-state evidence only; do not encode it as a product setting.

Verification Checklist

  • switch.published: the instance owner is the canonical key above.
  • Exact generated property keys are used for label, description, and hint.
  • Track and thumb remain library anatomy and the instance is not detached.
  • Hint remains absent; selected and disabled meaning is also stated in screen content and is not conveyed only by color.
WB Logistics · Design SystemСборка 91da5ae

Поиск по Wiki

Начните вводить название или текст