Coder Social home page Coder Social logo

magicbyt3 / proxima Goto Github PK

View Code? Open in Web Editor NEW
9.0 2.0 1.0 1.18 MB

Animation library built to play nicely together with XElement and Astro!

Home Page: https://magicbyt3.github.io/proxima/

License: Other

JavaScript 18.98% Astro 65.94% Svelte 10.50% CSS 4.58%
astro xelement

proxima's Introduction

💫PROXIMA

proxima is an FX library for astro built on top of X-Element you can animate any textnode letter by letter and any node as is provided a simple string passed into the animations property.

examples

---
	import Headline from "../components/headline/headline.astro";
---
<html lang="en">

<head>
	<meta charset="utf-8" />
	<link rel="icon" type="image/x-icon" href="/favicon.ico" />
	<meta name="viewport" content="width=device-width" />
	<title>Welcome to Proxima</title>
</head>
<body>
	<div style="width: 100%;">
		<Headline 
			class="red"
			iterations="4"
			easing="cubic-bezier(0.390, 0.575, 0.565, 1.000)"
			animations="color: [#f4fc05, randomColor, randomColor, randomColor, randomColor, randomColor, randomColor] | transform: [translateX(10%), translateY(20%), rotate(360deg), scale(0.75), rotate(45deg)]"
		>
				Headline h1
		</Headline>
	</div>
	<div style="width:100%;">
		<Headline 
			type="h2"
			class="blue"
			gradient="to right, green, blue, red, yellow"
			iterations="1"
			direction="alternate-reverse"
			delay="1000"
			animations="opacity: [0]"
		>
				Headline h2
		</Headline>
	</div>
	<div style="width:100%;">
		<Headline 
			type="h3"
			class="blue"
			delay="300"
			duration="3000"
			iterations="3"
			fullNode="false"
			animations="color: [#f4fc05, randomColor, randomColor, randomColor, randomColor, randomColor, randomColor] | transform: [translateX(10%), translateY(20%), scale(0.75), rotate(180deg)]"
		>
				<a href="https://github.com/p13rnd/proxima">PROXIMA</a>
		</Headline>
	</div>
	<div style="width:100%;">
		<Headline 
			type="h4"
			class="red"
			delay="4000"
			iterations="1"
			animations="opacity: [0]"
		>
				Headline h4
		</Headline>
	</div>
	<div style="width:100%;">
		<Headline 
			type="h5"
			class="blue"
			delay="300"
			iterations="1"
			fullNode="false"
			animations="opacity: [0, 1, 0, 1, 0, 1, 0, 1, 0, 1]"
		>
				Headline h5
		</Headline>
	</div>
	<div style="width:100%;">
		<Headline 
			type="h6"
			style="opacity:0;"
			class="blue"
			delay="2000"
			iterations="1"
			animations="opacity: [1]"
		>
				Headline h6
		</Headline>
	</div>
</body>

</html>

<style>
	h1 {
		font-size: 4rem;
	}
	h2 {
		font-size: 3.5rem;
	}
	h3 {
		font-size: 3rem;
	}
	h4 {
		font-size: 2.5rem;
	}
	h5 {
		font-size: 2rem;
	}
	h6 {
		font-size: 1.5rem;
	}
	.red {
		color: red;
	}
	.blue {
		color: blue;
	}
</style>

TODO: more detailed documentation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.