design-system icon indicating copy to clipboard operation
design-system copied to clipboard

Prop design best practices in Thinkmill design system components

Open gwyneplaine opened this issue 5 years ago • 2 comments

Prop design is insanely critical to the successful adoption of a React design systems components.

  • What are the most common types of props we'll find for our components?
  • What are the gotchas, patterns we want to avoid in design props for our components?
  • How do we support HTML attributes? Prop spreading, overrides?
  • What litmus test do we use to validate what should and shouldn't be a prop?

Ideally a junior should be able to look at this document, and immediately be able to recognise major pitfalls that they should avoid when building a Thinkmill design system component in react.

gwyneplaine avatar Nov 06 '19 02:11 gwyneplaine

@gwyneplaine I actually wrote some stuff down just yesterday regarding prop patterns

jossmac avatar Nov 07 '19 23:11 jossmac

@gwyneplaine I actually wrote some stuff down just yesterday https://github.com/thinkmill-training/react-patterns/tree/master/patterns/props-api-design

You must be a precog; fantastic thank you

gwyneplaine avatar Nov 07 '19 23:11 gwyneplaine