1.1.9 • Published 9 months ago

picori v1.1.9

Weekly downloads
-
License
-
Repository
-
Last release
9 months ago

picori - small reactive components defined in your html

picori is a small frontend framework that allows you to define reactive components by using plain HTML tags, without a build step.

<html>
  <head>
    <!-- Define a component -->
    <template name="my-component" prop="hi">
      <!-- This script runs whenever the component is mounted -->
      <script>
        console.log(prop) // The prop is accessible from the script!

        let boundHTML = prop + " world!"

        // Calling the expose function w/ an object will make that object accessible from the template
        expose ({ boundHTML })
      </script>

      <slot></slot>
      <!-- Template in data from a script -->
      <p-html :="boundHTML"></p-html>
    </template>

    <script type="module" src="https://esm.sh/picori"></script>
  </head>
  <body>
    <!-- You can use the component anywhere in your body now! -->
    <my-component>
      <!-- This gets templated into the <slot></slot> -->
      <h1>picori demo</h1>
    </my-component>
  </body>
</html>
1.1.9

9 months ago

1.1.8

9 months ago

1.1.7

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.2

9 months ago

1.0.1

9 months ago

0.0.1

9 months ago