Moh-Snoussi / tests-with-react

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Getting Started with Create React App

This project was bootstrapped with Create React App --template typescript. it has tailwindcss with few plugin and removes some boilerplate code.

Tailwindcss

Tailwindcss is a utility first css framework that helps build and compose design in the HTML markup.

Tailwindcss plugin used

Available Scripts

All script available in create-react-app are available as well npm run start

tip

If you are working with images then use responsive images generator, by installing Image Processing Pipeline and than ipp -i your_image_path -o src/Asssets/images to automatically generate different optimized web images for different screen size. after that include the generated images with:

import React, { Component } from 'react';

import splashMd from "./Asssets/images/splash-md.webp"
import splashSm from "./Asssets/images/splash-sm.webp"
import splashLg from "./Asssets/images/splash-lg.webp"
import splashXl from "./Asssets/images/splash-xl.webp"

class Splash extends Component
{
    render()
    {
        return (
            <div className='absolute z-n2 flex justify-center'>
                <img className={`min-w-screen min-h-screen object-cover `} src={splashMd} srcSet={ `${splashSm} 300w, ${splashMd} 768w, ${splashLg} 1280w, ${splashXl} 1400w`} alt='Splash' />
            </div>
        );
    }
}

About


Languages

Language:TypeScript 57.4%Language:HTML 22.5%Language:JavaScript 18.6%Language:CSS 1.5%