Embed smallcase Cards

There are two things required to display smallcase cards on any webpage:

  1. an embed script
  2. HTML element inside which the card should be loaded

Sample embed code

	 <strong>21G Trend Rider by 21G Investments</strong>

<script async src="https://www.smallcase.com/embed/assets/embed.js"></script>

Embed script

Embed script has a primary task to load smallcase card iframe inside ALL valid HTML elements (having class of sc-embed) in the webpage

You just need to add this once in the webpage -

<script async src="https://www.smallcase.com/embed/assets/embed.js"></script>


The script tag should be added only once per page, even if there are multiple embed code snippets integrated into the page.


This is the element inside which smallcase card will be displayed.

For the card to load properly, there are some required attributes that must be passed. To further tweak the behavior of the card, there are optional attributes as well.

Required attributes

  1. class
    • eithersc-embed or sc-hover. The latter displays smallcase card only when you hover over the element.
  2. data-smallcase
    • must have a value true
  3. data-scid
    • any valid smallcase
    • scid every smallcase is allocated a unique id

Optional attributes

  1. data-cta
    • whether to show "View smallcase" or "Invest now" as primary CTA button
    • can have value invest (default) or view
  2. data-cardsize
    • whether to display a smaller card (portrait) or big card (landscape)
    • can have value small (default) or big
    • big card will be displayed as smaller one on mobile and tablet devices
  3. data-viewoncreatorplatform
    • whether to display on microsite or sc.com
    • If the attribute is "true", the user will be redirected to .smallcase.com
  4. data-source & data-campaign (optional)
    • For better analytics, you can pass descriptive strings as values to these attributes
    • For example, data-source="your-website" data-campaign="article-name"
  5. style
    • As per your need, you can choose to add CSS styles to the tag. This is useful when you want to handle the positioning of the card.

Do I need to add anything inside HTML element containing "sc-embed" class?

It's optional to add HTML element(s) inside the element with class="sc-embed". If anything is added, it will be displayed as-is until the embed script loads. Once the embed script loads, it's replace the children element with an embed card.

We recommend that to add smallcase relevant textual information inside the span tag (for additional context to users with low internet speed). Something like - <span>[smallcase-name] by [smallcase-creator]</span>

Next steps

Trouble embedding the card? Troubleshoot -