Skip to content
TheChatArchiveThe Chat Archive
gpt-4o-2024-11-20· OpenAIAi2 WildChat-4.8M (AI2)

neumorphic calculator with neon moving border lines in every button

  1. User

    neumorphic calculator with neon moving border lines in every button

  2. Assistant

    Creating a "neumorphic calculator with neon-moving border lines" is a visually appealing project! Here's a brief description of how you could implement this idea, along with some tips.


    1. Visual Concept

    • Neumorphism is a design style that gives UI elements a 3D, soft, and extruded appearance by combining light and shadow effects.
    • Neon moving border lines will add an attractive animated glow effect that moves around each button, creating a modern and futuristic UI.
    • Combine soft, beveled calculator buttons with subtle shadows and glowing neon borders for a techy and cool vibe.

    2. Framework/Technology

    To implement this design, you can use:

    • HTML5 for structure
    • CSS3 for the neumorphic and neon styles
    • JavaScript for calculator functionality

    3. Example Code

    Below is an example of how you could start designing such a calculator:

    HTML

    <!DOCTYPE html>
    <html lang="en">
    <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Neumorphic Neon Calculator</title>
      <link rel="stylesheet" href="styles.css">
    </head>
    <body>
      <div class="calculator">
        <div class="display">
          <input type="text" id="calc-display" readonly>
        </div>
        <div class="buttons">
          <button class="btn">7</button>
          <button class="btn">8</button>
          <button class="btn">9</button>
          <button class="btn">/</button>
          <button class="btn">4</button>
          <button class="btn">5</button>
          <button class="btn">6</button>
          <button class="btn">*</button>
          <button class="btn">1</button>
          <button class="btn">2</button>
          <button class="btn">3</button>
          <button class="btn">-</button>
          <button class="btn">0</button>
          <button class="btn">.</button>
          <button class="btn">=</button>
          <button class="btn">+</button>
        </div>
      </div>
    </body>
    <script src="script.js"></script>
    </html>
    

    CSS

    /* General Reset */
    body {
      margin: 0;
      font-family: 'Arial', sans-serif;
      background: #1e1e2f;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 100vh;
      overflow: hidden;
    }
    
    .calculator {
      background: #2b2b40;
      padding: 20px;
      border-radius: 25px;
      box-shadow: 8px 8px 20px #191927, -8px -8px 20px #35354d;
    }
    
    .display input {
      width: 100%;
      height: 50px;
      border-radius: 10px;
      border: none;
      background: #2b2b40;
      box-shadow: inset 5px 5px 10px #191927, inset -5px -5px 10px #35354d;
      color: white;
      font-size: 1.5rem;
      padding: 10px;
      text-align: right;
    }
    
    .buttons {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 15px;
      margin-top: 20px;
    }
    
    .btn {
      position: relative;
      background: #2b2b40;
      border: none;
      border-radius: 12px;
      height: 60px;
      font-size: 1.2rem;
      color: white;
      cursor: pointer;
      outline: none;
      box-shadow: 5px 5px 15px #191927, -5px -5px 15px #35354d;
      transition: transform 0.2s ease-in-out;
    }
    
    /* Neon Border Effect */
    .btn::before {
      content: "";
      position: absolute;
      top: -2px;
      left: -2px;
      right: -2px;
      bottom: -2px;
      z-index: -1;
      border-radius: 12px;
      background: linear-gradient(90deg, #ff0000, #00ff00, #0000ff, #ff0000);
      background-size: 300%;
      animation: neon-border 3s linear infinite;
    }
    
    .btn:active {
      transform: scale(0.95);
      box-shadow: inset 3px 3px 6px #191927, inset -3px -3px 6px #35354d;
    }
    
    @keyframes neon-border {
      0% {
        background-position: 0%;
      }
      100% {
        background-position: 100%;
      }
    }
    

    JavaScript

    const buttons = document.querySelectorAll('.btn');
    const display = document.getElementById('calc-display');
    
    buttons.forEach((button) => {
      button.addEventListener('click', () => {
        const value = button.textContent;
    
        if (value === "=") {
          // Evaluate the expression
          try {
            display.value = eval(display.value); // WARNING: Use a safer evaluation method in production.
          } catch {
            display.value = "Error";
          }
        } else if (value === "C") {
          display.value = "";
        } else {
          // Append the value to the input
          display.value += value;
        }
      });
    });
    

    Features in This Design

    1. Neumorphic Buttons: Buttons are styled with inner and outer shadows for a 3D soft look.
    2. Neon Border Animation: A gradient border around each button moves through RGB colors (red to green to blue).
    3. Button Interaction: Buttons slightly shrink on click for a tactile effect.
    4. Basic Calculator Logic: Use JavaScript to handle functionalities such as addition, subtraction, etc.

    Customization Ideas

    • Adjust the animation speed in the @keyframes neon-border rule.
    • Add button hover effects with glowing shadows.
    • Add a dark-to-light theme toggle for more user interaction.

    Let me know if you'd like to expand this or need help troubleshooting! 🚀

  3. User

    [Chorus] Pai gayi shamaan ni Hunn yaad teri ne aa jana Tu padh liya jana ni Tere bina assan maar jana [Verse 1] Oh dil tode ne kinne Sadda vi todke ke jaa Chaal isse bahane ni Kar lena poora chaah [Pre-Chorus] Haaye dard vichhode ne Mainu andron hi khaa jana [Chorus] Pai gayi shamaan ni Hunn yaad teri ne aa jana Tu padh liya jana ni Tere bina assan maar jana [Verse 2] Oh jiwein ambran de wich taare ni Sare tere jholi taare ne Main taan chann nu thalle la dena Haaye aashiq tere saare ne Oh jiwein ambran de wich taare ni Sare tere jholi taare ne Main taan chann nu thalle la dena Haaye aashiq tere saare ne See upcoming rap shows Get tickets for your favorite artists You might also like Story of My Life One Direction Faasle Kaavish & Quratulain Balouch meet the grahams Kendrick Lamar [Pre-Chorus] Tu ik vaari hass taan de Mereya dukhan ne mukk jana [Chorus] Pai gayi shamaan ni Hunn yaad teri ne aa jana Tu padh liya jana ni Tere bina asssan maar jana [Verse 3] Oh kise changgi qismat waale di Qismat de wich tu howengi Oh yaad vi kesi yaad hou Jis yaad de wich tu khowegi Oh kise changgi qismat waale di Qismat de wich tu howengi Oh yaad vi kesi yaad hou Jis yaad de wich tu khowegi [Pre-Chorus] Tu jaadon jaadon sharmaye Kinniya mukk diyan ne jana [Chorus] Pai gayi shamaan ni Hunn yaad teri ne aa jana Tu padh liya jana ni Tere bina asssan maar jana

    write a punjabi song like i provided but dont make the same i just provided for exaamplr

  4. Assistant

    Sure! Here's an original Punjabi song for you, keeping the vibe and structure similar, but with a completely new set of lyrics and emotions:


    [Chorus]
    Raatan lambiyan ne, tere khyaalan nu vi bhull jana
    Bas ik waari aa keh dena, main taan tere naal reh jana
    Haan, saanjh saanjh di dua ban ke,
    Teri yaad’an vich hi dhal jana

    [Verse 1]
    Vekhe si sapna ik din, tere naal hove zindagi
    Kitey khushiyan ban jaavan, bas reh javey bekhudi
    Oh rabb kolon manga si,
    Ik thoda sa pyar vi
    Tu door hogi tan vi, dil vich reheni tuzar vi

    [Pre-Chorus]
    Jithe haase vi rul de ne,
    Tithon saah vi mukh jana

    [Chorus]
    Raatan lambiyan ne, tere khyaalan nu vi bhull jana
    Bas ik waari aa keh dena, main taan tere naal reh jana
    Haan, saanjh saanjh di dua ban ke,
    Teri yaad’an vich hi dhal jana

    [Verse 2]
    Oh mitti jaise mausam de vich,
    Koi rooh di khushboo aayi ae
    Main kalla kalla langh gavaan,
    Par tu ae zindagi banayi ae
    Jivein galli vich chanan hove
    Jis raat ton jaana door ae
    Main veham karde birhaan nal
    Tu mere naal zaroor ae

    [Pre-Chorus]
    Haaye saanjh de picchhon aayi,
    Teri yaadan vi rul jana

    [Chorus]
    Raatan lambiyan ne, tere khyaalan nu vi bhull jana
    Bas ik waari aa keh dena, main taan tere naal reh jana
    Haan, saanjh saanjh di dua ban ke,
    Teri yaad’an vich hi dhal jana

    [Bridge]
    Oh sohneya tu vasda, mere dil de near’e
    Main likhan tere layi kavita, likhan chaand te tare
    Ik gallon vi tu samajh layi, pyar rahe sada sada
    Main jeena tere bina vi, hai rehta adhura!

    [Pre-Chorus]
    Ik vaar nazaran milla ke,
    Tere kol mere vich reh jana

    [Chorus]
    Raatan lambiyan ne, tere khyaalan nu vi bhull jana
    Bas ik waari aa keh dena, main taan tere naal reh jana
    Haan, saanjh saanjh di dua ban ke,
    Teri yaad’an vich hi dhal jana


    This song has a dreamy, emotional vibe with the essence of longing, love, and hope. It could easily blend with soft Punjabi imagery and melodies. Let me know if you'd like it refined or want something in a different tone like sad, romantic rap, or upbeat! 😊