Existing component libraries (like Semantic or Bootstrap, etc.) provide a huge variety of options for designers and developers to use. By contrast, Recipe restricts the number of options available to allow more polished interfaces to be designed and provide designers and developers the freedom to focus on solving user problems, instead of spending time making a decision about which component to use.
We consider properties such as margin
and position
to be aspects of layout. Individual components should not have opinions about layout outside of their own border. Instead layout is contextually applied by containers to their children.
Design layouts with a mobile first approach. Use responsive design to enhance layouts to make better use of the space available on larger devices.
use
property that accepts values like info
, warning
, error
is preferrable to a color
property that accepts hex color codes.Think about one way doors vs. two way doors. Once downstream applications start using the API, it can be hard to change. However, internal implemenation decisions within Recipe are usually easier to take back and evolve without disrupting client applications. Here are some examples to consider:
It's a system
Don't worry about localization (yet)
useTranslation
hook to assist with the process of interpolating dynamic values into static messages.