npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

convertkit-svelte

v0.0.1

Published

ConvertKit Forms for Svelte

Downloads

3

Readme

Using Vue? Try ConvertKit-Vue Using React? Try ConvertKit-Vue WARNING: THIS PROJECT IS NOT READY FOR USE

Setup

yarn add convertkit-svelte

Demos

View examples on how to use different templates here and how to style your form with custom styling here

Usage

import ConvertKitForm from 'convertkit-react'

const MY_FORM_ID = 1234567

function HomePage() {
  return (
    <ConvertKitForm formId={MY_FORM_ID} />
  )
}

To get your form id, go to the form you have created on convertkit and choose the HTML embed option.

form embed screenshot

Here you'll pick out your form id from the form action in the embed code:

<form
  action="https://app.convertkit.com/forms/YOUR_FORM_ID_IS_HERE/subscriptions"
></form>

Passing custom configuration options

function HomePage() {
  const config = {
    formId: MY_FORM_ID,
    template: 'mills',
    emailPlaceholder: 'Enter an email address',
    submitText: 'Sign up',
  }

  return (
    <ConvertKitForm {...config} />
  )
}

Configuration Options

| Property | Type | Default | Description | | ---------------- | ------------ | -------------------- | -------------------- | | format | String | inline | inline, modal, slidein, sticky | | template | String | minimal | Templates in the app + minimal | | submitText | String | Subscribe | Text shown in submit button | | headingText | String | Varies per template | Text shown in heading | | disclaimerText | String | Varies per template | Text shown in disclaimer area | | emailPlaceholder | String | Your email | Placeholder for email input | | namePlaceholder | String | Your first name | Placeholder for first name input | | nameLabel | String | First name | Custom name label | | emailLabel | String | Email | Custom email label | | showLabels | Boolean | false | Shows labels with form inputs or only rely on aria-label | | hideName | Boolean | false | Hides the name input field | | newTab | Boolean | false | Determines if form should be processed in new tab or current | | stack | Boolean | true | Determines if inputs are stacked or placed inline | | hideWarnings | Boolean | false | Hide warnings that are shown due to misconfiguration | | backgroundImage | String | default on template | Use a different background image for your form | | backgroundOpacity | Number | 0.8 | Opacity here is the inverse of what is on the app which really measures transparency |

Templates

The minimal template has no preconfigured styling, leaving you options to style as desired. To get a preconfigured style, use one of the app templates (clare, mills, rainier, powell etc) as seen on the app.

Content

To change the subheader (sometimes referred to as content) you may just add children inside the <ConvertkitForm> component like below:

<ConvertKitForm {...config}>
  <p>Subscribe to get our latest content by email.</p>
</ConvertKitForm>

Contributing

To publish a package:

./publish X.X.X "Message about version"

where X.X.X is the version number.