Story Components

Web components for building Instagram Stories with HTML. Drop <insta-*> elements into your page to render pixel-perfect stickers using the same rendering engine as the Storrito editor.

Quick Start

<script src="https://ORG_UUID.storrito.com/js/insta-components.js"></script>

<insta-story>
  <div style="position:absolute;top:0;left:0;width:100%;height:100%;
              background:#1a1a2e"></div>
  <p style="position:absolute;left:300px;top:800px;
            font-family:'Instagram Sans Condensed';font-size:100px;
            color:#ffffff;font-weight:bold">Hello!</p>
  <insta-hashtag hashtag="travel"
    style="position:absolute;left:300px;top:1100px"></insta-hashtag>
</insta-story>

Key Concepts

  • Container: <insta-story> defines a 1080x1920px canvas. All stickers go inside it.
  • Scaling: Scale the story container with CSS transform: scale(0.25) to fit it into your page. The story always renders at full 1080x1920 resolution.
  • Transforms: Rotate and scale individual stickers via CSS transform.
  • Sticker sizing: Give interactive stickers a real rendered box. transform: scale(...), flexbox and explicit width / height are supported, but avoid zero-size boxes. When a sticker has no rendered width or height, Instagram may accept the story while making the native sticker invisible or hard to tap.
  • Safe zone: Instagram overlays its own UI on stories (profile bar at the top, reply bar at the bottom). Keep stickers within the safe zone: top 270px to bottom 270px (top: 270px through top: 1650px), and 40px from left/right edges. Stickers placed outside this area may be obscured by Instagram’s UI.
  • Spacing: Leave at least 30px of vertical gap between stickers. Stickers that touch or overlap look unprofessional and can be hard to tap on Instagram.
  • Text: There is no <insta-text> component — use plain HTML text elements (<p>, <h1>, <div>, etc.) with CSS styling. The font Instagram Sans Condensed (regular + bold) is automatically loaded by insta-components.js and is the default Instagram story text font. Other auto-loaded fonts: AvenyT, Roboto (regular + bold), Noto Color Emoji. All Google Fonts from /css/fonts.css are also available. Example: <p style="font-family:'Instagram Sans Condensed'; font-size:80px; color:#fff; font-weight:bold">Hello!</p>

Composed Examples

Full story compositions showing how to combine multiple stickers.

See Full Examples

Component Reference

Story Container<insta-story>

The 1080x1920 container for an Instagram story. All sticker elements are placed inside this container. The default background is black (#000). There is no `background` attribute — use a child `<div>` or `<img>` element with absolute positioning to set a custom background color or image (see Quick Start example above).

AttributeTypeDefaultDescription
srcstringURL to a video file. The video is displayed as the story background and can be toggled play/pause by clicking.

Examples

Custom background
<insta-story></insta-story>
Video background
<insta-story src="https://assets.mixkit.co/videos/1164/1164-1080.mp4"></insta-story>

Hashtag Sticker<insta-hashtag>

Renders an Instagram-style hashtag pill sticker.

AttributeTypeDefaultDescription
hashtagstringThe hashtag text (without the # symbol).
designenum: default, gray, rainbow"default"Visual design variant.

Examples

Default
<insta-hashtag hashtag="travel"></insta-hashtag>
Gray
<insta-hashtag hashtag="summer" design="gray"></insta-hashtag>
Rainbow
<insta-hashtag hashtag="photography" design="rainbow"></insta-hashtag>

Mention Sticker<insta-mention>

Renders an Instagram-style @mention pill sticker.

AttributeTypeDefaultDescription
usernamestringThe Instagram username (without the @ symbol).
designenum: default, gray, rainbow"default"Visual design variant.

Examples

Default
<insta-mention username="vacations"></insta-mention>
Gray
<insta-mention username="johndoe" design="gray"></insta-mention>
Rainbow
<insta-mention username="photographer" design="rainbow"></insta-mention>

Location Sticker<insta-location>

Renders an Instagram-style location sticker with a pin icon.

AttributeTypeDefaultDescription
locationstringThe location name to display.
location-idstringOptional Instagram location ID for linking.
designenum: default, gray, black, orange, rainbow"default"Visual design variant.

Examples

Default
<insta-location location="Cologne"></insta-location>
Gray
<insta-location location="Berlin" design="gray"></insta-location>
Black
<insta-location location="New York" design="black"></insta-location>
Orange
<insta-location location="Paris" design="orange"></insta-location>
Rainbow
<insta-location location="Tokyo" design="rainbow"></insta-location>

Link Sticker<insta-link>

Renders an Instagram-style link sticker with a chain icon.

AttributeTypeDefaultDescription
urlstringThe URL the link points to.
textstring"Link"Display text for the link.
designenum: default, gray, black, rainbow"default"Visual design variant.

Examples

Default
<insta-link url="https://example.com/shop"></insta-link>
Custom text
<insta-link url="https://example.com" text="Shop Now" design="gray"></insta-link>
Rainbow
<insta-link url="https://example.com" text="Visit Site" design="rainbow"></insta-link>

Poll Sticker<insta-poll>

Renders an Instagram-style poll with 2-4 options.

AttributeTypeDefaultDescription
questionstringThe poll question text.
optionsJSON arrayJSON array of option strings, e.g. '["Yes", "No"]'. Supports 2-4 options.
colorenum: black, pink, lavender, purple, orange, green, blue"black"Color theme for the poll. Instagram only supports these specific colors: black (#262626), pink (#FE0169), lavender (#D402C6), purple (#7536FA), orange (#FF7A00), green (#1DD04F), blue (#0294F6).

Examples

Pink, 2 options
<insta-poll question="Beach or Mountains?" options='["Beach", "Mountains"]' color="pink"></insta-poll>
Purple, 4 options
<insta-poll question="Best language?" options='["JavaScript", "Python", "Clojure", "Rust"]' color="purple"></insta-poll>
Green
<insta-poll question="Do you agree?" options='["Yes", "No"]' color="green"></insta-poll>

Question Sticker<insta-question>

Renders an Instagram-style question box where followers can submit responses.

AttributeTypeDefaultDescription
questionstringThe prompt text displayed in the question box.
colorenum: white, black, pink, lavender, purple, orange, green, blue"white"Background color theme. Instagram only supports these specific colors: white (#ffffff), black (#262626), pink (#FE0169), lavender (#D402C6), purple (#7536FA), orange (#FF7A00), green (#1DD04F), blue (#0294F6).

Examples

White
<insta-question question="Ask me anything!" color="white"></insta-question>
Pink
<insta-question question="What do you think?" color="pink"></insta-question>
Purple
<insta-question question="What's your favorite food?" color="purple"></insta-question>

Quiz Sticker<insta-quiz>

Renders an Instagram-style quiz with a dark header and multiple choice options. Instagram only supports the dark color (#262626) for quiz stickers.

AttributeTypeDefaultDescription
questionstringThe quiz question text.
optionsJSON arrayJSON array of answer strings. Supports 2-4 options.
correct-answernumber0Zero-based index of the correct answer.

Examples

Default
<insta-quiz question="Capital of France?" options='["London", "Paris", "Berlin", "Madrid"]' correct-answer="1"></insta-quiz>
Three options
<insta-quiz question="Legs on a spider?" options='["6", "8", "10"]' correct-answer="1"></insta-quiz>

Countdown Sticker<insta-countdown>

Renders an Instagram-style countdown timer. Instagram only supports these specific solid colors.

AttributeTypeDefaultDescription
titlestring"COUNTDOWN"Title text displayed above the timer.
end-timestringISO 8601 datetime string in UTC for the countdown target. Values with trailing `Z` and values without timezone are accepted, e.g. "2027-01-01T00:00:00Z" or "2027-01-01T00:00:00".
colorenum: black, white, purple, red, orange, yellow, green, blue"black"Color theme. Instagram only supports these specific colors: black (#262626), white (#ffffff), purple (#a307ba), red (#ed4956), orange (#fd8d32), yellow (#fdcb5c), green (#70c050), blue (#3897f0).

Examples

Black
<insta-countdown title="NEW YEAR" end-time="2027-01-01T00:00:00"></insta-countdown>
Red
<insta-countdown title="LAUNCH DAY" end-time="2026-06-15T12:00:00" color="red"></insta-countdown>
Blue
<insta-countdown title="SALE ENDS" end-time="2026-12-25T00:00:00" color="blue"></insta-countdown>

Emoji Slider<insta-emoji-slider>

Renders an Instagram-style emoji slider for sentiment reactions.

AttributeTypeDefaultDescription
questionstringOptional question text displayed above the slider.
emojistring"😍"The emoji shown on the slider handle.
colorstring"#ffffff"Background color of the slider bar.
text-colorstring"#000000"Color of the question text.

Examples

White bg, pizza
<insta-emoji-slider question="How much do you like pizza?" emoji="🍕" color="#ffffff" text-color="#000000"></insta-emoji-slider>
Dark bg, heart eyes
<insta-emoji-slider question="Rate this sunset" emoji="😍" color="#262626" text-color="#ffffff"></insta-emoji-slider>
No question
<insta-emoji-slider emoji="🔥" color="#FE0169" text-color="#ffffff"></insta-emoji-slider>