- Prop
tone- Type
"info" | "success" | "neutral" | "accent" | undefined- Default
"accent"- Requirement
- optional
- Description
- —
Docs Components Primitives
Sticker
React example follows below.
Vue example follows below.
Angular example follows below.
Svelte example follows below.
Solid example follows below.
- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
const stickerFixture = { id: "sticker", items: [ { label: "What I build", tone: "accent", rotate: -3 }, { label: "Boring tech", tone: "neutral", rotate: 2 }, { label: "It just runs", tone: "success", rotate: -1 }, ],} satisfies { id: string; items: ReadonlyArray<{ label: string; tone: "accent" | "neutral" | "success" | "info"; rotate: number; }>;}; import { Sticker } from "@grassroot/ui-react"; export default function StickerDemo() { return ( <div> {stickerFixture.items.map((item) => ( <Sticker key={item.label} tone={item.tone} rotate={item.rotate}> {item.label} </Sticker> ))} </div> );}- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script setup lang="ts">const stickerFixture = { id: "sticker", items: [ { label: "What I build", tone: "accent", rotate: -3 }, { label: "Boring tech", tone: "neutral", rotate: 2 }, { label: "It just runs", tone: "success", rotate: -1 }, ],} satisfies { id: string; items: ReadonlyArray<{ label: string; tone: "accent" | "neutral" | "success" | "info"; rotate: number; }>;}; import { Sticker } from "@grassroot/ui-vue";</script> <template> <div> <Sticker v-for="item in stickerFixture.items" :key="item.label" :tone="item.tone" :rotate="item.rotate" >{{ item.label }}</Sticker > </div></template>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
import { Component } from "@angular/core";const stickerFixture = { id: "sticker", items: [ { label: "What I build", tone: "accent", rotate: -3 }, { label: "Boring tech", tone: "neutral", rotate: 2 }, { label: "It just runs", tone: "success", rotate: -1 }, ],} satisfies { id: string; items: ReadonlyArray<{ label: string; tone: "accent" | "neutral" | "success" | "info"; rotate: number; }>;}; import { GrassrootSticker } from "@grassroot/ui-angular"; @Component({ selector: "app-sticker-demo", standalone: true, imports: [GrassrootSticker], template: ` <div> @for (item of fixture.items; track item.label) { <grassroot-sticker [tone]="item.tone" [rotate]="item.rotate">{{ item.label }}</grassroot-sticker> } </div> `,})export class StickerDemoComponent { protected readonly fixture = stickerFixture;} export default StickerDemoComponent;- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
<script lang="ts"> const stickerFixture = { id: "sticker", items: [ { label: "What I build", tone: "accent", rotate: -3 }, { label: "Boring tech", tone: "neutral", rotate: 2 }, { label: "It just runs", tone: "success", rotate: -1 }, ], } satisfies { id: string; items: ReadonlyArray<{ label: string; tone: "accent" | "neutral" | "success" | "info"; rotate: number; }>; }; import { Sticker } from "@grassroot/ui-svelte";</script> <div> {#each stickerFixture.items as item (item.label)} <Sticker tone={item.tone} rotate={item.rotate}>{item.label}</Sticker> {/each}</div>- parts
- —
- nodes
- —
- size
- —
- part
- —
ts
/** @jsxImportSource solid-js */import { Sticker } from "@grassroot/ui-solid";const stickerFixture = { id: "sticker", items: [ { label: "What I build", tone: "accent", rotate: -3 }, { label: "Boring tech", tone: "neutral", rotate: 2 }, { label: "It just runs", tone: "success", rotate: -1 }, ],} satisfies { id: string; items: ReadonlyArray<{ label: string; tone: "accent" | "neutral" | "success" | "info"; rotate: number; }>;}; export default function StickerDemo() { return ( <div> {stickerFixture.items.map((item) => ( <Sticker tone={item.tone} rotate={item.rotate}> {item.label} </Sticker> ))} </div> );}Installation
API Reference
Import
import { Sticker } from "@grassroot/ui-react";
Props
Prop
Type
Default
Requirement
Description
tone"info" | "success" | "neutral" | "accent" | undefined"accent"optional
—
rotatenumber | undefined-2optional
Degrees of rotation for the tilt.
- Prop
rotate- Type
number | undefined- Default
-2- Requirement
- optional
- Description
- Degrees of rotation for the tilt.
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.
Import
import { Sticker } from "@grassroot/ui-vue";
Props
Prop
Type
Default
Requirement
tone"accent" | "neutral" | "success" | "info" | undefined"accent"optional
rotatenumber | undefined-2optional
- Prop
tone- Type
"accent" | "neutral" | "success" | "info" | undefined- Default
"accent"- Requirement
- optional
- Prop
rotate- Type
number | undefined- Default
-2- Requirement
- optional
Content regions
default
Import
import { Component } from "@angular/core";
import { GrassrootSticker } from "@grassroot/ui-angular";
Props
Prop
Type
Default
Requirement
toneStickerTone"accent"optional
rotatenumber-2optional
- Prop
tone- Type
StickerTone- Default
"accent"- Requirement
- optional
- Prop
rotate- Type
number- Default
-2- Requirement
- optional
Content regions
default
Import
import { Sticker } from "@grassroot/ui-svelte";
Props
Prop
Type
Default
Requirement
toneStickerTone"accent"optional
rotatenumber-2optional
- Prop
tone- Type
StickerTone- Default
"accent"- Requirement
- optional
- Prop
rotate- Type
number- Default
-2- Requirement
- optional
Content regions
children
Import
import { Sticker } from "@grassroot/ui-solid";
Props
Prop
Type
Default
Requirement
toneStickerTone—
optional
rotatenumber—
optional
- Prop
tone- Type
StickerTone- Default
- —
- Requirement
- optional
- Prop
rotate- Type
number- Default
- —
- Requirement
- optional
Content regions
children
Native attributes
Standard DOM and ARIA attributes not listed above spread onto the root element.