Getting Started with a Remix App using React Components

This guide helps you create a simple Remix application using the React framework along with Syncfusion® React components.

Prerequisites

System requirements for Syncfusion® React UI components

Create Remix application

To set up a basic Remix app, run the following command:

This create-react-router@latest command initializes a new Remix application using the latest available packages.

When you run this command, you'll be prompted to answer a few configuration questions:

Then navigate to the project directory by running the following command:

Add Syncfusion® React packages

All the available Syncfusion® React packages are published in npmjs.com public registry. To use the Numeric TextBox component, install the @syncfusion/react-inputs package:

The --save flag ensures that the Inputs package is added to the dependencies section of your package.json file.

Add CSS reference

To apply Syncfusion® themes, import the necessary CSS files in the ~/app/routes/home.tsx file:

Add SSR configuration

To use Syncfusion® packages with Server-Side Rendering (SSR) with Vite, you'll need to update the vite.config.ts file. This configuration ensures that Syncfusion® packages are properly transpiled for compatibility with the server environment.

Add the Numeric Textbox component

You can now start using Syncfusion® React components in your Remix application. To get started, add the React Numeric TextBox component to the ~/app/routes/home.tsx file using the following code:

Run the application

To run your Remix application in development mode, use the following command:

To prepare your app for deployment, build it for production using:

Then run the app in production mode:

The output will appear as follows: