BASE

Restyle

Restyle

React Native / mobile development · Free

A TypeScript library of theme-driven React Native components: it connects sizes, colors, and variants to a typed design system.

Also known as: shopify/restyle; restyle-react-native; react-native-restyle

Resource illustration: Restyle

Open resource ↗

What you can use for free

Code and local use under MIT.

Paid features and costs

Computing resources, self-hosting, and external services are paid for separately if used.

Access and limitations

Code and local use under MIT. Computing resources, self-hosting, and external services are paid for separately if used.

Use cases

  • Type a mobile theme and component variants
  • Connect typed styled components to a React Native screen

Example workflow

A possible workflow; this is not a report of hands-on testing.

Type a mobile theme and component variants.

Before you start

  • A React Native project and target devices.
  • A design, data, and platform requirements.

Steps

  1. Define colors/spacing and theme-driven variants.
  2. Connect typed styled components to a React Native screen.
  3. Build the application and test the workflow on target devices.

Check your result

  • Behavior meets the project's iOS and Android requirements.
  • Check gestures, accessibility, and performance on the target device.

Choosing Restyle

Type a mobile theme and component variants

Choose this when

  • Type a mobile theme and component variants
  • Connect typed styled components to a React Native screen

Requirements

  • Create a global theme with colors, spacing, and other tokens, and pass it to ThemeProvider.

Things to consider

  • Costs and limits of free use: Computing resources, self-hosting, and external services are paid for separately if used.
  • Terms of use: MIT for the code; dependencies have separate licenses.
  • Restyle provides the foundation for a typed React Native design system; it is not a complete ready-made set of all screens and controls.

Frequently asked questions

What can you use for free in Restyle?

Code and local use under MIT.

What additional costs might arise with Restyle?

Computing resources, self-hosting, and external services are paid for separately if used.

What terms of use matter for Restyle?

MIT for the code; dependencies have separate licenses.

How do you get started with Restyle?

Define colors/spacing and theme-driven variants. Connect typed styled components to a React Native screen. Build the application and test the workflow on target devices.

Why does backgroundColor accept a name rather than an arbitrary token?

Theme types let TypeScript accept only colors declared in your theme and suggest them in the editor. For example, define cardPrimaryBackground.

What does createTheme do?

The function checks the BaseTheme structure and preserves your values' specific types. Pass the theme to ThemeProvider at the React tree root.

License

MIT for the code; dependencies have separate licenses.

MIT — permissive license

You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.

License terms

Technologies and topics

  • Restyle
  • mobile
  • Development

Sources

Other resources