Documentation
Our WebsiteOur Github
  • 👋Welcome to Infinitode Documentation
  • AI Documentation
  • API Documentation
    • Basic Math API Documentation (#Experimental)
    • BMI Calculator API Documentation
    • Character Counter API Documentation
    • Chemical Equation Balancer API Documentation
    • Color Generator API Documentation
    • Date Difference Calculator API Documentation
    • Dungen API Documentation
    • Dungen Dev API Documentation
    • Factorial Calculator API Documentation
    • Fantasy Name Generator API Documentation
    • Fibonacci Sequence Generator API Documentation
    • GCD Calculator API Documentation
    • Hash API Documentation
    • Helix PSA API Documentation
    • LCM Calculator API Documentation
    • Leap Year Checker API Documentation
    • Lorem API Documentation
    • Molar Mass Calculator API Documentation (#Experimental)
    • MycoNom API Documentation
    • Name Generator API Documentation
    • Palindrome Checker API Documentation
    • Password Generator API Documentation
    • Password Strength Detector API Documentation
    • Periodic Table API Documentation
    • Prime Number Checker API Documentation
    • Quadratic Equation Solver API Documentation
    • Random Facts Generator API Documentation
    • Random Quotes Generator API Documentation
    • Roman Numeral Converter API Documentation
    • Simple Interest Calculator API Documentation
    • Slugify API Documentation
    • Text Case Converter API Documentation
    • Unit Converter API Documentation
    • Username Generator API Documentation
    • UUID Generator API Documentation
    • Vowel Counter API Documentation
  • Package Documentation
    • BlurJS Package Documentation
      • BlurJS Usage Examples
      • BlurJS Reference Documentation
    • CodeSafe Package Documentation
      • CodeSafe Reference
        • CodeSafe Functions
    • DeepDefend Package Documentation
      • DeepDefend Reference
        • Attacks Functions
        • Defenses Functions
    • DupliPy Package Documentation
      • DupliPy Reference
        • Formatting Functions
        • Replication Functions
        • Similarity Functions
        • Text Analysis Functions
    • FuncProfiler Package Documentation
      • FuncProfiler Reference
        • FuncProfiler Functions
    • Hued Package Documentation
      • Hued Reference
        • Analysis Functions
        • Colors Functions
        • Conversions Functions
        • Palettes Functions
    • LocalSiteMap Package Documentation
      • LocalSiteMap Reference
        • LocalSiteMap Functions
    • PyAutoPlot Package Documentation
      • PyAutoPlot Reference
        • PyAutoPlot Functions
    • PyWebScrapr Package Documentation
      • PyWebScrapr Reference
        • PyWebScrapr Functions
    • ValX Package Documentation
      • ValX Reference
        • ValX Functions
Powered by GitBook
On this page
  • 1. Create a Basic HTML File
  • 2. Add BlurJS
  • 3. Make Magic
  • 4. The End

Was this helpful?

  1. Package Documentation
  2. BlurJS Package Documentation

BlurJS Usage Examples

Simple usage examples for getting started with BlurJS.

1. Create a Basic HTML File

Firstly we're going to create a basic HTML file, with just a parent div and a child div.

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Blur Example</title>
    <style>
        .parent {
            position: relative;
        }
    </style>
</head>
<body>
    <div class="parent">
        <div class="blur"></div>
    </div>
</body>
</html>

2. Add BlurJS

Now, let's add BlurJS to the project. For faster loading, we're going to use the minified version of BlurJS. Add this script tag at the bottom, just before the ending </body> tag.

<script src="https://cdn.jsdelivr.net/gh/Infinitode/BlurJS@main/dist/blur.min.js"></script>

3. Make Magic

After you've done that, let's finally make some magic!

  • Add this next to <div class="blur", remember to put a space between them.

blur-width="50px" blur-height="50px"

You can experiment with adding other values as the height or width, like 100% or even 6em.

  • You can also experiment with adding other properties, like for instance, moving the blur around using blur-left or blur-top.

  • You can change the blur size, color, blur amount, and even the z-index, allowing you to position your blur above or below other elements.

4. The End

Now that you've made some pretty cool blurs, why not let your creativity flow? Build brand new modern sites using BlurJS, or, who knows, even spice up some of your old sites with some carefully placed colored gradient blurs.

PreviousBlurJS Package DocumentationNextBlurJS Reference Documentation

Last updated 6 months ago

Was this helpful?

We'd love to see what you've created, be sure to tag us on X/Twitter when you share your BlurJS implementation using #BlurJS.

@InfinitodeLTD