57

Idyll-lang: Make your app stand out with data-driven stories

 6 years ago
source link: https://www.tuicool.com/articles/hit/UVBvUja
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Idyll-lang: Make your app stand out with interactive data-driven stories

yuEFfuy.png!web
Idyll is an open-source markup language and web runtime

Do you know what’s hot right now?

Explorable explanations.

Explorable explanations are data-driven documents which have interactivity. You have seen many EE’s on the web, everyone loves them!

Take this carefully crafted graph for instance.

Explorable explanations example — Where boys end up after growing up with wealth

It’s a well designed graph with animations and it’s well informative.

Explorable explanations make things fun — The way we receive the information is compelling.

mmmEB3.gif
Traveling Salesman Algorithms

We crave for new information, especially with great delivery and aesthetics.

MraAF3v.gif
Traveling Salesman Algorithms

Here’s a great article going in more depth on being an active reader, reactive documents and contextual information .

What is idyll?

Nz6Rbyj.png!web
https://github.com/idyll-lang/idyll

Idyll is an open-source markup language and toolkit for producing interactive web pages. You give Idyll a markup file, and it compiles that file to a full bundle of HTML, JavaScript, and CSS that can run in anyone’s web browser.

7neUz2z.png!web
Idyll is a new markup language
IVFbI3V.png!web
https://idyll-lang.org/

At it’s core, Idyll is a markup language. Not just any markup language, Idyll let’s you leverage modular/component approach like any modern language. Idyll also lets you reuse third party packages (npm) and combined (optional) with React.

The traditional end-to-end procedure for Idyll;

  • You initialize a standalone project per document.
  • You write code for the formula, graph, chart, etc.
  • Once finished, you publish/deploy the document and embed it to your website/SPA.

Idyll is great at creating charts with 5 lines of code.

vuy2u2N.gif
The Etymology of Trig Functions by Matthew Conlen

Look how smooth that rendering is. Let’s give Idyll a go, here’s the browser editor.

2a6jInv.png!web
Idyll browser editor

Write some basic markup as usual. At it’s surface it looks like regular markup.

IJRFjeM.png!web
basic markup for applying formatting

Here’s where it gets cool. We can use components, variables and math equations inside our markup.

Let’s spin up a pie chart.

BZfA7fE.png!web
Pie chart with Idyll — powered by victory charts

Notice the logic and the components are inside the bracket syntax []

Sweet! Idyll has built-in components which we can reuse. In case you’re curious, the props you can pass to the chart component are the following.

RZ7Rz2r.png!web

Equations

Idyll uses KaTeX to typeset mathematical equations.

6riqM3B.png!web

Fixed

N3EnqqA.gif

Content inside of a fixed component will be locked in place, even when the rest of the document scrolls. The scroll example uses the fixed component to keep the dynamic chart in place:

List of all built-in components.

Vb2ya2b.png!web
https://idyll-lang.org/docs/components

Getting started with Idyll

uIBzAjZ.png!web
https://idyll-lang.org/docs/getting-started

Using d3 with Idyll

mAjI7nQ.png!web
https://idyll-lang.github.io/idyll-d3-component/

Using Idyll with NPM

vqq6veI.png!web
https://idyll-lang.org/docs/components/npm

Idyll is one way to make your app stand out. It’s great at it although.

Now go out there and build something awesome!

Thanks for reading! ❤


Recommend

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK