Skip to content

Instantly share code, notes, and snippets.

View nitinfab's full-sized avatar
🎯
Focusing

nitinfab

🎯
Focusing
View GitHub Profile

📢 On mobile? Swipe left to see more →

Tool Name Price Available Add-ons Duration Input Image Output Image
Aragon AI $35 ✅ Editing featu
<html>
<head>
<title>CSS Variables</title>
<style>
/* Defining global variables */
:root {
--bg-color: blue;
--text-color: white;
}
/* var() function used here */
//Tags.css
.tags{
margin: 20px auto;
display: flex;
flex-wrap: wrap;
overflow: hidden;
width: 70%;
min-width: 80%;
border: 1px rgb(173, 162, 162) solid;
//Tags.js
import React from "react";
import { MdClose } from "react-icons/md"
import "./Tags.css"
const Tags = (props) => {
const [error, setError] = React.useState("");
const [tags, setTags] = React.useState([]);
//Tags.js
// Add or remove tags by using the key event
const handleTags = event => {
if (event.key === "Enter" && event.target.value !== "") {
setTags([...tags, event.target.value]);
event.target.value = "";
}
else if (event.key === "Backspace" && tags.length && event.target.value == 0){
const tagsCopy = [...tags];
// Tags.js
import React from "react";
import { MdClose } from "react-icons/md"
import "./Tags.css"
const Tags = () => {
const [tags, setTags] = React.useState([]);
const [error, setError] = React.useState("");
import React from 'react';
import { Formik, Field, Form, ErrorMessage } from 'formik';
import * as Yup from 'yup';
const SignupForm = () => {
return (
<Formik
initialValues={{ firstName: '', lastName: '', email: '' }}
validationSchema={Yup.object({
firstName: Yup.string()
import React from 'react';
import { useFormik } from 'formik';
import * as Yup from 'yup';
const SignupForm = () => {
const formik = useFormik({
initialValues: {
firstName: '',
lastName: '',
email: '',