-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
559 lines (548 loc) · 38.8 KB
/
index.html
File metadata and controls
559 lines (548 loc) · 38.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Default Starter</title>
<!-- normalize -->
<link rel="stylesheet" href="./normalize.css" />
<!-- main css -->
<link rel="stylesheet" href="./main.css" />
<style>
body {
padding: 2rem;
}
.img {
width: 400px;
}
</style>
</head>
<body>
<script src="https://cdn.freecodecamp.org/testable-projects-fcc/v1/bundle.js"></script>
<nav class="nav_bar" id="navbar">
<header>
React Documentation
</header>
<ul class="nav_ul">
<li >
<a href="#Getting_started_with_React" class="nav-link">Getting started with React</a>
</li>
<li>
<a href="#Hello_React" class="nav-link">Hello React</a>
</li>
<li>
<a href="#Use_cases" class="nav-link">Use cases</a>
</li>
<li>
<a href="#How_does_React_use_JavaScript?" class="nav-link">How does React use JavaScript?</a>
</li>
<li>
<a href="#Setting_up_your_first_React_app" class="nav-link">Setting up your first React app</a>
</li>
<!-- <li>
<a href="#Requirements" class="nav-link">Requirements</a>
</li> -->
<li>
<!-- <a href="#Initializing_your_app" class="nav-link">Initializing your app</a> -->
</li>
<li>
<a href="#EXPLORING_OUR_FIRST_REACT_COMPONENT" class="nav-link">EXPLORING OUR FIRST REACT COMPONENT</a>
</li>
<li>
<!-- <a href="#Import_statements" class="nav-link">Import statements</a>
</li>
<li>
<a href="#The_App_component" class="nav-link">The App component</a>
</li> -->
<li>
<a href="#Interrogating_the_index" class="nav-link">Interrogating the index</a>
</li>
<li>
<a href="#Variables_and_props" class="nav-link">Variables and props</a>
</li>
<li>
<a href="#Summary" class="nav-link">Summary</a>
</li>
</ul>
</nav>
<main class="main" id="main-doc">
<section class="main-section" id="Getting_started_with_React">
<header id="Getting_started_with_React">Getting started with React</header>
<article>
<p>In this article we will say hello to React. We'll discover a little bit of detail about its background and use cases,
set up a basic React toolchain on our local computer, and create and play with a simple starter app — learning a bit about how React works in the process.</p>
<div class="table">
<div class="table_item">
<span class="item_one">Prerequisites:</span>
<p>Familiarity with the core HTML, CSS, and JavaScript languages, knowledge of the terminal/command line.
React uses an HTML-in-JavaScript syntax called JSX (JavaScript and XML). Familiarity with both HTML and JavaScript will help you to learn JSX, and better identify whether bugs in your application are related to JavaScript or to the more specific domain of React.</p>
</div>
<div class="table_item">
<span class="item_two">Objective:</span>
<p>To set up a local React development environment, create a start app, and understand the basics of how it works</p>
</div>
</div>
</article>
</section>
<section class="main-section" id="Hello_React">
<header id="Hello_React">Hello React</header>
<article>
<p>
As its official tagline states, React is a library for building user interfaces. React is not a framework – it's not even exclusive to the web. It's used with other libraries to render to certain environments. For instance, React Native can be used to build mobile applications.
</p>
<p>
To build for the web, developers use React in tandem with ReactDOM. React and ReactDOM are often discussed in the same spaces as — and utilized to solve the same problems as — other true web development frameworks. When we refer to React as a "framework", we’re working with that colloquial understanding. </p>
<p>
React's primary goal is to minimize the bugs that occur when developers are building UIs. It does this through the use of components — self-contained, logical pieces of code that describe a portion of the user interface. These components can be composed together to create a full UI, and React abstracts away much of the rendering work, leaving you to concentrate on the UI design.
</p>
</article>
</section>
<section class="main-section" id="Use_cases">
<header id="Use_cases">Use cases</header>
<article>
<p>
Unlike the other frameworks covered in this module, React does not enforce strict rules around code conventions or file organization. This allows teams to set conventions that work best for them, and to adopt React in any way they would like to. React can handle a single button, a few pieces of an interface, or an app's entire user interface. </p>
<p>
While React can be used for small pieces of an interface, it's not as easy to "drop into" an application as a library like jQuery, or even a framework like Vue — it is more approachable when you build your entire app with React.
<p>
In addition, many of the developer-experience benefits of a React app, such as writing interfaces with JSX, require a compilation process. Adding a compiler like Babel to a website makes the code on it run slowly, so developers often set up such tooling with a build step. React arguably has a heavy tooling requirement, but it can be learned.
</p>
<p>
This article is going to focus on the use case of using React to render the entire user interface of an application, using tooling provided by Facebook’s own create-react-app tool.
</p>
</article>
</section>
<section class="main-section" id="How_does_React_use_JavaScript?">
<header id="How_does_React_use_JavaScript?">How does React use JavaScript?</header>
<article>
<p>
React utilizes features of modern JavaScript for many of its patterns. Its biggest departure from JavaScript comes with the use of JSX syntax. JSX extends JavaScript's syntax so that HTML-like code can live alongside it. For example:
<br>
<code>const heading = Mozilla Developer Network;</code>
This heading constant is known as a JSX expression. React can use it to render that h1 tag in our app.
</p>
<p>
Suppose we wanted to wrap our heading in a tag, for semantic reasons? The JSX approach allows us to nest our elements within each other, just like we do with HTML:
<code>const header = (<br>
header<br>
h1 Mozilla Developer Network h1<br>
header<br>
);</code>
</p>
<code class="bg">
Note: The parentheses in the previous snippet aren't unique to JSX, and don’t have any effect on your application. They're a signal to you (and your computer) that the multiple lines of code inside are part of the same expression. You could just as well write the header expression like this:
<code>
const header = header<br>
h1 Mozilla Developer Network h1<br>
header
</code>
However, this looks kind of awkward, because the header tag that starts the expression is not indented to the same position as its corresponding closing tag.
</code>
<p>
Of course, your browser can't read JSX without help. When compiled (using a tool like Babel or Parcel), our header expression would look like this:
<code> const header = React.createElement("header", null,<br>
React.createElement(h1, null, Mozilla Developer Network)<br>
);
</code>
It's possible to skip the compilation step and use React.createElement() to write your UI yourself. In doing this, however, you lose the declarative benefit of JSX, and your code becomes harder to read. Compilation is an extra step in the development process, but many developers in the React community think that the readability of JSX is worthwhile. Plus, popular tooling makes the JSX-to-JavaScript compilation part of its setup process. You don't have to configure compilation yourself unless you want to.
</p>
<p>
Because JSX is a blend of HTML and JavaScript, some developers find it intuitive. Others say that its blended nature makes it confusing. Once you're comfortable with it, however, it will allow you to build user interfaces more quickly and intuitively, and allow others to better understand your codebase at a glance.
</p>
<p>To read more about JSX, check out the React team's JSX In Depth article.</p>
</article>
</section>
<section class="main-section" id="Setting_up_your_first_React_app">
<header id="Setting_up_your_first_React_app">Setting up your first React app</header>
<article>
<p>
There are many ways to use React, but we're going to use the command-line interface (CLI) tool create-react-app, as mentioned earlier, which expedites the process of developing a React application by installing some packages and creating some files for you, handling the tooling described above.
</p>
<p>
It's possible to add React to a website without create-react-app by copying some script elements into an HTML file, but the create-react-app CLI is a common starting point for React applications. Using it will allow you to spend more time building your app, and less time fussing with setup.
</p>
<h4 id="Requirements">Requirements</h4>
<p>
In order to use create-react-app, you need to have Node.js installed. It's recommended that you use the long-term support (LTS) version. Node includes npm (the node package manager), and npx (the node package runner).
</p>
<p>
You may also use the Yarn package manager as an alternative, but we'll assume you are using npm in this set of tutorials. See Package management basics for more information on npm and yarn.
</p>
<p>
If you're using Windows, you will need to install some software to give you parity with Unix/macOS terminal in order to use the terminal commands mentioned in this tutorial. Gitbash (which comes as part of the git for Windows toolset) or Windows Subsystem for Linux (WSL) are both suitable. See Command line crash course for more information on these, and on terminal commands in general.
</p>
<P>
Also bear in mind that React and ReactDOM produce apps that only work on a fairly modern set of browsers — IE9+ by way of some polyfills. It is recommended that you use a modern browser like Firefox, Microsoft Edge, Safari, or Chrome when working through these tutorials.
</P>
<p>
Also, see the following for more information:
<ul>
<li>
<a class="link_a" href="https://nodejs.org/en/knowledge/getting-started/npm/what-is-npm/">"What is npm" on nodejs.org</a>
</li>
<li>
<a class="link_a" href="https://blog.npmjs.org/post/162869356040/introducing-npx-an-npm-package-runner">Introducing npx" on the npm blog</a>
</li>
<li>
<a class="link_a" href="https://create-react-app.dev/">The create-react-app documentation</a>
</li>
</ul>
</p>
<h4 id="Initializing_your_app">Initializing your app</h4>
<p>
create-react-app takes one argument: the name you'd like to give your app. create-react-app uses this name to make a new directory, then creates the necessary files inside it. Make sure you cd to the place you'd like your app to live on your hard drive, then run the following in your terminal:
<code>
npx create-react-app moz-todo-react
</code>
</p>
<p>
This creates a moz-todo-react directory, and does several things inside it:
<ul>
<li>Installs some npm packages essential to the functionality of the app.</li>
<li>Writes scripts for starting and serving the application.</li>
<li>Creates a structure of files and directories that define the basic app architecture.</li>
<li>Initializes the directory as a git repository, if you have git installed on your computer.</li>
</ul>
</p>
<code class="bg">
Note: if you have the yarn package manager installed, create-react-app will default to using it instead of npm. If you have both package managers installed and explicitly want to use NPM, you can add the flag --use-npm when you run create-react-app:
<code>
npx create-react-app moz-todo-react --use-npm
</code>
</code>
<p>create-react-app will display a number of messages in your terminal while it works; this is normal! This might take a few minutes, so now might be a good time to go make a cup of tea.</p>
<p>When the process is complete, cd into the moz-todo-react directory and run the command npm start. The scripts installed by create-react-app will start being served at a local server at localhost:3000, and open the app in a new browser tab. Your browser will display something like this:</p>
<img class="img"src="./react.png" alt="screen">
<h4>Application structure</h4>
<p>Icreate-react-app gives us everything we need to develop a React application. Its initial file structure looks like this:
<code>
moz-todo-react<br>
├── README.md<br>
├── node_modules<br>
├── package.json<br>
├── package-lock.json<br>
├── .gitignore<br>
├── public<br>
│ ├── favicon.ico<br>
│ ├── index.html<br>
│ └── manifest.json<br>
└── src<br>
├── App.css<br>
├── App.js<br>
├── App.test.js<br>
├── index.css<br>
├── index.js<br>
├── logo.svg<br>
└── serviceWorker.js<br>
</code>
The src directory is where we'll spend most of our time, as it's where the source code for our application lives.
</p>
<p>
The public directory contains files that will be read by your browser while you're developing the app; the most important of these is index.html. React injects your code into this file so that your browser can run it. There's some other markup that helps create-react-app function, so take care not to edit it unless you know what you're doing. You very much should change the text inside the title element in this file to reflect the title of your application. Accurate page titles are important for accessibility!
</p>
<p>
The public directory will also be published when you build and deploy a production version of your app. We won’t cover deployment in this tutorial, but you should be able to use a similar solution to that described in our Deploying our app tutorial.
</p>
<p>
The package.json file contains information about our project that Node.js/npm uses to keep it organized. This file is not unique to React applications; create-react-app merely populates it. You don't need to understand this file at all to complete this tutorial, however, if you'd like to learn more about it, you can read What is the file `package.json`? on NodeJS.org; we also talk about it in our Package management basics tutorial.
</p>
</article>
<section class="main-section" id="EXPLORING_OUR_FIRST_REACT_COMPONENT">
<header id="EXPLORING_OUR_FIRST_REACT_COMPONENT">Exploring our first React component</header>
<article>
<p>
In React, a component is a reusable module that renders a part of our app. These parts can be big or small, but they are usually clearly defined: they serve a single, obvious purpose.
</p>
<p>
Let's open src/App.js, since our browser is prompting us to edit it. This file contains our first component, App, and a few other lines of code:
<code>
import React from 'react';<br>
import logo from './logo.svg';<br>
import './App.css';<br>
function App() {<br>
return (<br>
div className="App"<br>
header className="App-header"<br>
img src={logo} className="App-logo" alt="logo"<br>
p<br>
Edit code src/App.js code and save to reload.<br>
/p<br>
a<br>
className="App-link"<br>
href="https://reactjs.org"<br>
target="_blank"<br>
rel="noopener noreferrer"<br>
><br>
Learn React<br>
/a<br>
/header<br>
/div<br>
);<br>
}<br>
export default App;<br>
</code>
The App.js file consists of three main parts: some import statements at the top, the App component in the middle, and an export statement at the bottom. Most React components follow this pattern.
</p>
<h4 id="Import_statements">Import statements</h4>
<p>
The import statements at the top of the file allow App.js to use code that has been defined elsewhere. Let's look at these statements more closely.
<code>
import React from 'react';<br>
import logo from './logo.svg';<br>
import './App.css';<br>
</code>
The first statement imports the React library itself. Because React turns the JSX we write into React.createElement(), all React components must import the React module. If you skip this step, your application will produce an error.
</p>
<p>
The second statement imports a logo from './logo.svg'. Note the use of ./ at the beginning of the path, and the .svg extension at the end — these tell us that the file is local and that it is not a JavaScript file. Indeed, the logo.svg file lives in our source directory.
</p>
<p>
We don't write a path or extension when importing the React module — this is not a local file; instead, it is listed as a dependency in our package.json file. Be careful of this distinction as you work through this lesson!
</p>
<p>
The third statement imports the CSS related to our App component. Note that there is no variable name and no from directive. This particular import syntax is not native to JavaScript module syntax — it comes from Webpack, the tool create-react-app uses to bundle all our JavaScript files together and serve them to the browser.
</p>
<h4 id="The_App_component">The App component</h4>
<p>
After the imports, we have a function named App. Whereas most of the JavaScript community prefers camel-case names like helloWorld, React components use pascal-case variable names, like HelloWorld, to make it clear that a given JSX element is a React component, and not a regular HTML tag. If you were to rename the App function to app, your browser would show you an error.
</p>
<p>
Let's look at App more closely.
<code>
function App() {<br>
return (<br>
div className="App"><br>
header className="App-header"><br>
img src={logo} className="App-logo" alt="logo" /><br>
p><br>
Edit code>src/App.js /code> and save to reload.<br>
/p><br>
a<br>
className="App-link"<br>
href="https://reactjs.org"<br>
target="_blank"<br>
rel="noopener noreferrer"<br>
><br>
Learn React<br>
/a><br>
/header><br>
/div><br>
);<br>
}
</code>
The App function returns a JSX expression. This expression defines what your browser ultimately renders to the DOM.
</p>
<p>
Some elements in the expression have attributes, which are written just like in HTML, following a pattern of attribute="value". On line 3, the opening div> tag has a className attribute. This is the same as the class attribute in HTML, but because JSX is JavaScript, we can't use the word class — it's reserved, meaning JavaScript already uses it for a specific purpose and it would cause problems here in our code. A few other HTML attributes are written differently in JSX than they are in HTML too, for the same kind of reason. We'll cover them as we encounter them.
</p>
<p>
Take a moment to change the p> tag on line 6 so that it reads "Hello, world!", then save your file. You'll notice that this change is immediately rendered in the development server running at http://localhost:3000 in your browser. Now delete the a> tag and save; the "Learn React" link will be gone.
</p>
<p>
Your App component should now look like this:
<code>
function App() {<br>
return (<br>
div className="App"><br>
header className="App-header"><br>
img src={logo} className="App-logo" alt="logo" /><br>
p><br>
Hello, World!<br>
/p><br>
/header><br>
/div><br>
);<br>
}
</code>
</p>
<h4>Export statements</h4>
<p>At the very bottom of the App.js file, the statement export default App makes our App component available to other modules.</p>
</article>
</section>
<section class="main-section" id="Interrogating_the_index">
<header id="Interrogating_the_index">Interrogating the index</header>
<p>
Let’s open src/index.js, because that's where the App component is being used. This file is the entry point for our app, and it initially looks like this:
<code>
import React from 'react';<br>
import ReactDOM from 'react-dom';<br>
import './index.css';<br>
import App from './App';<br>
import * as serviceWorker from './serviceWorker';<br>
ReactDOM.render(<br>
React.StrictMode><br>
App /><br>
React.StrictMode>,<br>
document.getElementById('root')<br>
);<br>
<br>
// If you want your app to work offline and load faster, you can change<br>
// unregister() to register() below. Note this comes with some pitfalls.<br>
// Learn more about service workers: https://bit.ly/CRA-PWA<br>
serviceWorker.unregister();
</code>
As with App.js, the file starts by importing all the JS modules and other assets it needs to run. src/index.css holds global styles that are applied to our whole app. We can also see our App component imported here; it is made available for import thanks to the export statement at the bottom of App.js.
</p>
<p>Line 7 calls React’s ReactDOM.render() function with two arguments:
<ul>
<li>The component we want to render, App /> in this case.</li>
<li>The DOM element inside which we want the component to be rendered, in this case the element with an ID of root. If you look inside public/index.html, you'll see that this is a div> element just inside the body>.</li>
</ul>
All of this tells React that we want to render our React application with the App component as the root, or first component.
<code>
Note: In JSX, React components and HTML elements must have closing slashes. Writing just App> or just img> will cause an error.
</code>
Service workers are interesting pieces of code that help application performance and allow features of your web applications to work offline, but they’re not in scope for this article. You can delete line 5, as well as most of the code below it.
</p>
<p>
Your final index.js file should look like this:
<code>
import React from 'react';<br>
import ReactDOM from 'react-dom';<br>
import './index.css';<br>
import App from './App';<br>
<br>
ReactDOM.render(App />, document.getElementById('root'));
</code>
</p>
</section>
<section class="main-section" id="Variables_and_props">
<header id="Variables_and_props">Variables and props</header>
<p>
Next, we'll use a few of our JavaScript skills to get a bit more comfortable editing components and working with data in React. We'll talk about how variables are used inside JSX, and introduce props, which are a way of passing data into a component (which can then be accessed using variables).
</p>
<h4>Variables in JSX</h4>
<p>
Back in App.js, let’s focus on line 9:
<code>
img src={logo} className="App-logo" alt="logo" />
</code>
Here, the img /> tag's src attribute value is in curly braces. This is how JSX recognizes variables. React will see {logo}, know you are referring to the logo import on line 2 of our app, then retrieve the logo file and render it.
</p>
<p>
Let's try making a variable of our own. Before the return statement of App, add const subject = 'React';. Your App component should now look like this:
<code>
function App() {<br>
const subject = "React";<br>
return (<br>
div className="App"><br>
header className="App-header"><br>
img src={logo} className="App-logo" alt="logo" /><br>
p><br>
Hello, World!<br>
/p><br>
/header><br>
/div><br>
);<br>
}
</code>
Change line 8 to use our subject variable instead of the word "world", like this:
<code>
function App() {<br>
const subject = "React";<br>
return (<br>
<iv className="App"><br>
header className="App-header"><br>
img src={logo} className="App-logo" alt="logo" /><br>
p><br>
Hello, {subject}!<br>
/p><br>
/header><br>
/div><br>
);<br>
}
</code>
When you save, your browser should display "Hello, React!" instead of "Hello, world!<br><br>
Variables are convenient, but the one we've just set doesn’t make great use of React's features. That's where props come in.
</p>
</section>
<section class="main-section" id="Summary">
<header id="Summary">Summary</header>
<p>
This brings us to the end of our initial look at React, including how to install it locally, creating a starter app, and how the basics work. In the next article, we'll start building our first proper application — a todo list. Before we do that, however, let's recap some of the things we’ve learned.
<br><br>
In React:
<ul>
<lI>Components can import modules they need and must export themselves at the bottom of their files.</lI>
<li>Component functions are named with PascalCase.</li>
<li>You can read JSX variables by putting them between curly braces, like {so}.</li>
<li>Some JSX attributes are different than HTML attributes so that they don't conflict with JavaScript reserved words. For example, class in HTML translates to className in JSX. Note that multi-word attributes are camel-cased.</li>
<li>Props are written just like attributes inside component calls and are passed into components.</li>
</ul>
</p>
</section>
<footer>
<h4>Resources</h4>
<a href="https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks/React_getting_started#application_structure">Mozzila MDN</a>
</footer>
</main>
</body>
</html>
<!-- <h1>hello world</h1>
<p>
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Repellat dolorem
a ullam repudiandae! Voluptates dolorum ducimus, ipsa natus vel ratione.
</p>
<h2>hello world</h2>
<p>
Lorem ipsum dolor, sit amet consectetur adipisicing elit. Repellat dolorem
a ullam repudiandae! Voluptates dolorum ducimus, ipsa natus vel ratione.
</p>
<h1>hello world</h1>
<h2>hello world</h2>
<h3>hello world</h3>
<h4>hello world</h4>
<h5>hello world</h5>
<a href="#">link example</a>
<ul>
<li>First Item</li>
<li>Second Item</li>
<li>Third Item</li>
</ul>
<img src="./computer.jpeg" alt="computer" class="img" />
<br />
<button class="btn" type="button">regular button</button>
<button class="btn btn-hipster" type="button">hipster button</button>
<br />
<br />
<br />
<div class="alert alert-danger">hello from danger</div>
<div class="alert alert-success">hello from success</div>
<form class="form">
<h4>contact form</h4>
<div class="form-row">
<label for="name" class="form-label">Name</label>
<input
type="text"
placeholder="hello there"
id="name"
class="form-input"
/>
</div>
<div class="form-row">
<label for="number" class="form-label">Number</label>
<input type="number" id="number" class="form-input" />
</div>
<div class="form-row">
<label for="email" class="form-label">Email</label>
<input type="email" id="email" class="form-input" />
<small class="form-alert">please provide value</small>
</div>
<div class="form-row">
<label for="textarea" class="form-label">Textarea</label>
<textarea class="form-textarea">
Default Value
</textarea>
</div>
<button type="submit" class="btn btn-block">submit</button>
</form>
<div class="loading"></div>
<br />
<br />
<div class="title">
<h2>section title</h2>
<div class="title-underline"></div>
</div>
</body>
</html> -->