Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Component Property + Variable Planning

βš™οΈ Property & Variable Planning

πŸ”§ What It Is & Why It Matters

Property and Variable Planning is a foundational step in our component creation workflow. It’s the design equivalent of mise en placeβ€”a preparation phase that ensures we understand exactly what a component needs before visual design, prototyping, or variant logic begins.

This planning ensures that:

  • βœ… We stay consistent across the design system

  • βœ… Components scale smoothly with themes, states, and responsiveness

  • βœ… Designers and developers align early on structure and logic

  • βœ… Tokens and variables are used intentionallyβ€”no hardcoding or guesswork


πŸ“Œ What It Includes

At a minimum, this step defines:

  • The component’s properties (e.g. size, state, hasIcon, style)

  • The variable collections and tokens to use for:

    • Surface (backgrounds)

    • Content (text/icon colors)

    • Border (stroke color and width)

    • Layout (padding, gap, radius)

  • Expected variants and interactive states

Property & Variable Planning isn’t just a checklistβ€”it’s how we build themed, scalable, and accessible components that behave consistently across a system.


🧩 Initial Planning Questions

πŸ–±οΈ Will this component have interactive states (hover, focus, active)?

  • Yes β†’ Is it a Toggle component? (e.g., switch, pill, checkbox) β†’ Is it a Priority component? (e.g., button, CTA) β†’ Use tokens from the status collections:

    • toggle/surface, toggle/border, toggle/content

    • or priority/surface, priority/content, etc.

  • No β†’ Use the semantic collection:

    • semantic/surface, semantic/border, semantic/content

    These reflect static intent (e.g., info, success) without interaction behavior.


πŸ“ Will this component support scalable sizes (sm, base, lg)?

  • Yes β†’ Use tokens from the size collection:

    • padding/scale/component-name/size

    • gap/component-name/icon-text

    • radius/component-name

  • No β†’ Use fixed values (e.g., padding: 8px, gap: 4px) sparingly

    This is acceptable for one-size utility components like badges or indicators.


🧩 Will this component include smaller, nested components?

Examples: Icon, Avatar, Badge, Progress Bar, Label

  • Yes β†’ Identify and reuse existing subcomponents where possible:

    • πŸ” Can we reuse an existing icon slot or avatar component?

    • 🧠 Will states or size of the parent affect nested components (e.g., icon color or size)? β†’ Document:

      • Expected slots (e.g., icon, dismiss button)

      • Token dependencies between parent and child components

  • No β†’ Keep planning scoped to a single-level structure.

Design it once, reuse it often.


πŸŽ›οΈ Will this component have variants or toggled options?

This includes anything that toggles visibility, style, or structure.

  • Yes β†’ Define:

    • Boolean props (e.g., has-icon, is-expandable)

    • Style variants (e.g., solid, ghost, outlined)

    • Content toggles (e.g., optional icon or expanding content) β†’ Consider how toggles impact:

    • Layout (padding/gap)

    • Visibility logic

    • Token application

  • No β†’ Keep configuration minimalβ€”avoid unnecessary complexity.

Variants and toggles are where flexibility meets system disciplineβ€”design the edges, but constrain the chaos.


πŸ“¦ Component Example: Pill

Based on discovery, the Pill component:

  • Will not have interaction states β†’ use semantic/* tokens

  • Will scale by size β†’ use tokens from the size collection

  • Has optional icon β†’ needs boolean logic and slot configuration

🧾 Property & Variable Plan: Pill Component

Design Element
Variable Collection
Notes

Surface color

semantic/surface

Background color for pill shape

Content color

semantic/surface

Applied to text and icon

Border color

semantic/surface

Optional; used for outlined/ghost styles

Border radius

rounded/#

Consistent shape across all sizes

Size

default: base

Create a property for scalable size modes

Border width

border-width/#

Defines stroke thickness

Padding

padding/#

Vertical/horizontal spacing by size

Gap

gap/#

Spacing between icon and text

Boolean

has-icon

Used to toggle icon slot visibility

Style

default: grey

Style variants: solid, outlined, ghost

Text

Tag Text

Create string property to change label text


βœ… Pill Summary

  • βœ”οΈ No interaction β†’ uses semantic tokens

  • βœ”οΈ Scales β†’ uses size tokens for padding/gap/radius

  • βœ”οΈ Variant support β†’ style (solid/ghost) and has-icon boolean

  • βœ”οΈ Modular β†’ icon slot inherits token logic from content/*

Last updated

Was this helpful?