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.
<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>
<div style="position:absolute;top:0;left:0;width:100%;height:100%;
box-sizing:border-box;padding:300px 60px;
display:flex;flex-direction:column;align-items:center;
justify-content:center;gap:40px">
<p style="margin:0;font-family:'Instagram Sans Condensed';
font-size:100px;color:#ffffff;font-weight:bold">Hello!</p>
<insta-hashtag hashtag="travel"></insta-hashtag>
<insta-link url="https://example.com" text="Shop Now"></insta-link>
</div>
</insta-story><insta-story> defines a 1080x1920px canvas. All stickers go inside it.<div style="position:absolute;top:0;left:0;width:100%;height:100%;box-sizing:border-box;padding:300px 60px;display:flex;flex-direction:column;align-items:center;gap:40px">. Sticker sizes depend on their text, options and design, so hand-picked top values for absolutely positioned stickers overlap easily. Use absolute positioning only for a sticker that has to sit on a specific spot of the background, and leave room for the rendered sizes listed in the Component Reference.size="instagram": Stickers are drawn in Instagram's current sticker design, but by default inside the box listed in the Component Reference, the size of the earlier design, so that existing layouts keep their spacing and look: the new sticker is never wider and never taller than that box and is centred in it (a pill is as tall as before and a little narrower). Add size="instagram" to a sticker (every sticker except <insta-music>) to get the size Instagram gives a new sticker instead, usually smaller. CSS width and transform: scale(...) resize a sticker in both cases: without size freely, with size="instagram" within Instagram's range (see Sticker size limits).size="instagram" can only be made as small or as large as Instagram lets you pinch it: <insta-emoji-slider> 157-933px wide, <insta-mention> 6-138px tall, <insta-poll> 158-910px wide, <insta-question> 339-1084px wide, <insta-link> 83-146px tall, <insta-quiz> 158-910px wide, <insta-countdown> 175-1032px wide, <insta-hashtag> 6-138px tall, <insta-location> 6-138px tall (pills by their height, since their width follows the text). A sticker outside its range (CSS width, height or transform: scale(...)) is changed to the limit around the same centre and reported in the warnings of schedule-instagram-story.gap of 40px or more keeps them apart. schedule-instagram-story reports overlapping stickers in the warnings of its response and schedules the story anyway.top: 250px and its bottom edge at most at 1620px (a pill sticker 177px tall starts at top: 1443px at the latest). The flex column's padding of 300px top and bottom and 60px left and right keeps everything inside it; the top padding is 300px like the bottom, so a column with justify-content:center stays centered. Stickers placed outside this area may be obscured by Instagram's UI.transform: scale(0.25) to fit it into your page. The story always renders at full 1080x1920 resolution.transform. A transform does not change the layout box, so rotated stickers in a flex column keep their gap.design="invisible" on <insta-link>, <insta-hashtag>, <insta-mention> and <insta-music> puts a tappable area on the story without a sticker visual, over a button, a name or a hashtag that the background shows itself (an invisible music sticker still plays its song). Its CSS width and height set the area (without them it has the size of the visible sticker); each side is between 120px and 1000px, and an area outside these limits is changed to them around the same centre and reported in the warnings of schedule-instagram-story. An invisible sticker is never rotated: a rotation is replaced by the box it covers, with a warning. design="invisible" on any other sticker is reported as well, that sticker stays visible. On this page a dashed frame shows where the area is; the posted story shows nothing there. Keep it inside the safe zone like any sticker.<insta-music search-term="Beautiful Day U2"> adds Instagram's music sticker (design: simple, album-art, vinyl or invisible). Storrito searches the search term with the Instagram account that posts the story right before the story is rendered and takes the first song Instagram finds, so name the song title and the artist. When Instagram finds nothing, the story is posted without music; a story rendered again later searches again. track-id (Instagram's track id) takes that track among the songs found instead of the first, and start-ms starts its section there instead of at Instagram's suggested start, e.g. <insta-music search-term="Beautiful Day U2" track-id="249810515420048" start-ms="42000">; when the posting account does not find that track, the first song plays from its suggested start. This page and the scheduling request do not know the song yet: the page shows the search term and a gray cover, the previewUrl of status-instagram-story shows the found song. One music sticker per story (only the first <insta-music> is used), an image story with music becomes a 15 second video, and business accounts can only use the royalty-free Meta Sound Collection. An account that Instagram does not offer the music sticker is refused like for every sticker.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.<insta-text> component, write text as plain HTML elements (<p>, <h1>, <div>, etc.) with CSS styling. In a flex column give them margin:0, the gap provides the spacing. 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="margin:0;font-family:'Instagram Sans Condensed';font-size:80px;color:#fff;font-weight:bold">Hello!</p>Full story compositions showing how to combine multiple stickers.
See Full Examples→<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).
| Attribute | Type | Default | Description |
|---|---|---|---|
src | string | — | URL to a video file. The video is displayed as the story background and can be toggled play/pause by clicking. |
<insta-story></insta-story><insta-story src="https://assets.mixkit.co/videos/1164/1164-1080.mp4"></insta-story><insta-hashtag>Renders an Instagram-style hashtag pill sticker.
Rendered size: 177px tall, the width follows the text: 454px for "#travel". An invisible one has the CSS `width` and `height` you give it, 120-1000px each.
| Attribute | Type | Default | Description |
|---|---|---|---|
hashtag | string | — | The hashtag text (without the # symbol). |
design | enum: default, gray, rainbow, invisible | "default" | Visual design variant: `default` a white pill, `gray` frosted glass, `rainbow` a rainbow border. `invisible` puts a tappable area without a visual on the story, over something the background shows (see "Invisible stickers" in the Key Concepts). |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-hashtag hashtag="travel"></insta-hashtag><insta-hashtag hashtag="summer" design="gray"></insta-hashtag><insta-hashtag hashtag="photography" design="rainbow"></insta-hashtag><insta-hashtag hashtag="travel" design="invisible"></insta-hashtag><insta-hashtag hashtag="travel" size="instagram"></insta-hashtag><insta-mention>Renders an Instagram-style @mention pill sticker.
Rendered size: 177px tall, the width follows the text: 594px for "@vacations". An invisible one has the CSS `width` and `height` you give it, 120-1000px each.
| Attribute | Type | Default | Description |
|---|---|---|---|
username | string | — | The Instagram username (without the @ symbol). |
design | enum: default, gray, rainbow, invisible | "default" | Visual design variant: `default` a white pill, `gray` frosted glass, `rainbow` a rainbow border. `invisible` puts a tappable area without a visual on the story, over something the background shows (see "Invisible stickers" in the Key Concepts). |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-mention username="vacations"></insta-mention><insta-mention username="johndoe" design="gray"></insta-mention><insta-mention username="photographer" design="rainbow"></insta-mention><insta-mention username="vacations" design="invisible"></insta-mention><insta-location>Renders an Instagram-style location sticker with a pin icon.
Rendered size: 177px tall, the width follows the text: 529px for "Cologne".
| Attribute | Type | Default | Description |
|---|---|---|---|
location | string | — | The location name to display. |
location-id | string | — | Optional Instagram location ID for linking. |
design | enum: default, gray, rainbow | "default" | Visual design variant: white (`default`), frosted glass (`gray`) or a rainbow border (`rainbow`), the designs Instagram offers. The former `black` and `orange` are shown as `default`, with a warning. |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-location location="Cologne"></insta-location><insta-location location="Berlin" design="gray"></insta-location><insta-location location="Tokyo" design="rainbow"></insta-location><insta-link>Renders an Instagram-style link sticker with a chain icon.
Rendered size: 177px tall, the width follows the text: 605px for "Shop Now". An invisible one has the CSS `width` and `height` you give it, 120-1000px each.
| Attribute | Type | Default | Description |
|---|---|---|---|
url | string | — | The URL the link points to. |
text | string | "Link" | Display text for the link. |
design | enum: default, gray, black, rainbow, invisible | "default" | Visual design variant. `invisible` puts a tappable area without a visual on the story, over something the background shows (see "Invisible stickers" in the Key Concepts). |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-link url="https://example.com/shop"></insta-link><insta-link url="https://example.com" text="Shop Now" design="gray"></insta-link><insta-link url="https://example.com" text="Visit Site" design="rainbow"></insta-link><insta-link url="https://example.com/shop" design="invisible"></insta-link><insta-poll>Renders an Instagram-style poll card with 2-4 options. With a question the card has a header in the poll color, without one it is only the options.
Rendered size: 768px wide, 566px tall with 2 options, 728px with 3, 890px with 4.
| Attribute | Type | Default | Description |
|---|---|---|---|
question | string | — | The poll question text, optional. |
options | JSON array | — | JSON array of option strings, e.g. '["Yes", "No"]'. Supports 2-4 options. |
color | enum: black, pink, lavender, purple, orange, green, blue | "black" | Color theme for the poll. Instagram only supports these specific colors: black (#0C1014), pink (#FE0169), lavender (#D402C6), purple (#7536FA), orange (#FF7A00), green (#1DD04F), blue (#0294F6). |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-poll question="Beach or Mountains?" options='["Beach", "Mountains"]' color="pink"></insta-poll><insta-poll question="Best language?" options='["JavaScript", "Python", "Clojure", "Rust"]' color="purple"></insta-poll><insta-poll question="Do you agree?" options='["Yes", "No"]' color="green"></insta-poll><insta-poll question="Do you agree?" options='["Yes", "No"]' size="instagram"></insta-poll><insta-question>Renders an Instagram-style question box where followers can submit responses. Its input field reads "Schreibe etwas ..." when the story is German (`lang="de"` on `<html>`, `<insta-story>` or the sticker), "Type something ..." otherwise.
Rendered size: 771px wide, 454px tall.
| Attribute | Type | Default | Description |
|---|---|---|---|
question | string | — | Optional prompt text displayed as the title of the question box. Without it the box has no title row. |
color | enum: 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). |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-question question="Ask me anything!" color="white"></insta-question><insta-question question="What do you think?" color="pink"></insta-question><insta-question question="What's your favorite food?" color="purple"></insta-question><insta-quiz>Renders an Instagram-style quiz card with a dark header and multiple choice options, each with its letter. Instagram only supports the dark color (#262626) for quiz stickers.
Rendered size: 771px wide, 541px tall with 2 options, 709px with 3, 877px with 4.
| Attribute | Type | Default | Description |
|---|---|---|---|
question | string | — | The quiz question text. |
options | JSON array | — | JSON array of answer strings. Supports 2-4 options. |
correct-answer | number | 0 | Zero-based index of the correct answer. |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-quiz question="Capital of France?" options='["London", "Paris", "Berlin", "Madrid"]' correct-answer="1"></insta-quiz><insta-quiz question="Legs on a spider?" options='["6", "8", "10"]' correct-answer="1"></insta-quiz><insta-countdown>Renders an Instagram-style countdown timer. Instagram only supports these specific solid colors.
Rendered size: 693px wide, 433px tall.
| Attribute | Type | Default | Description |
|---|---|---|---|
title | string | "COUNTDOWN" | Title text displayed above the timer. |
end-time | string | — | ISO 8601 datetime string in UTC for the countdown target. Values with trailing `Z` and values without timezone are accepted, e.g. "2027-12-02T00:00:00Z" or "2027-12-02T00:00:00". It must lie in the future. |
color | enum: 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). |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-countdown title="NEW YEAR" end-time="2027-03-02T00:00:00"></insta-countdown><insta-countdown title="LAUNCH DAY" end-time="2027-06-02T12:00:00" color="red"></insta-countdown><insta-countdown title="SALE ENDS" end-time="2027-09-02T00:00:00" color="blue"></insta-countdown><insta-emoji-slider>Renders an Instagram-style emoji slider for sentiment reactions.
Rendered size: 818px wide, 262px tall without a question, 467px with one.
| Attribute | Type | Default | Description |
|---|---|---|---|
question | string | — | Optional question text displayed above the slider. |
emoji | string | "😍" | The emoji shown on the slider handle. |
color | string | "#ffffff" | Background color of the slider bar. |
text-color | string | "#000000" | Color of the question text. |
size | enum: instagram | — | Without it the sticker is drawn in Instagram's current design inside the box below, the size of the earlier sticker design: never wider or taller, centred in it. `instagram` gives it the size Instagram gives a new sticker instead, usually smaller. |
<insta-emoji-slider question="How much do you like pizza?" emoji="🍕" color="#ffffff" text-color="#000000"></insta-emoji-slider><insta-emoji-slider question="Rate this sunset" emoji="😍" color="#262626" text-color="#ffffff"></insta-emoji-slider><insta-emoji-slider emoji="🔥" color="#FE0169" text-color="#ffffff"></insta-emoji-slider><insta-music>Adds a song from Instagram's music library with Instagram's music sticker. Storrito searches the `search-term` with the Instagram account that posts the story right before the story is rendered and takes the first song Instagram finds; its section plays for the length of the story. The preview shows the search term as the title and a gray cover; the story shows the song's title, artist and cover, and the sticker keeps its centre. When Instagram finds no song for the search term, the story is posted without the music sticker. Instagram shows one music sticker per story: only the first `<insta-music>` is used. Business accounts can only use the royalty-free Meta Sound Collection, so a popular song is often not found for them. An image story with a music sticker becomes a 15 second video. With `track-id` Storrito takes that track among the songs it finds for the search term instead of the first, and with `start-ms` the section starts there instead of at Instagram's suggested start, for a song a person picked with its section. When the track is not among the songs found (the posting account's catalog differs), the first song plays from its suggested start.
Rendered size: Simple: 201px tall, the width follows the search term (643px for "Beautiful Day U2"). Album art: 561x705px. Vinyl: 561x688px. In the story the sticker shows the found song, so its size changes around its centre. An invisible one has the CSS `width` and `height` you give it, 120-1000px each.
| Attribute | Type | Default | Description |
|---|---|---|---|
search-term | string | — | What Storrito searches in Instagram's music library, e.g. the song title and the artist. |
design | enum: simple, album-art, vinyl, invisible | "simple" | Instagram's music sticker visual: `simple` (white card), `album-art` (large cover), `vinyl` (spinning record). `invisible` plays the song without a visual and puts a tappable area on the story (see "Invisible stickers" in the Key Concepts). |
track-id | string | — | Optional: Instagram's id of the track (digits), as Instagram's music search answers it. Picks that track among the songs found for `search-term`; keep the search term the track's title and artist so that the search finds it. |
start-ms | number | — | Optional: where the section starts, in milliseconds from the song's start. A start that leaves less than the story's length of the song is moved back so the section fits. |
<insta-music search-term="Beautiful Day U2"></insta-music><insta-music search-term="Beautiful Day U2" design="album-art"></insta-music><insta-music search-term="Beautiful Day U2" design="vinyl"></insta-music><insta-music search-term="Beautiful Day U2" design="invisible"></insta-music>