DocsComponentsPrimitives
Sticker
React example follows below.
ts
import { Sticker } from "@grassroot/ui-react"; <Sticker tone="accent" rotate={-3}>What I build</Sticker><Sticker tone="neutral" rotate={2}>Boring tech</Sticker><Sticker tone="success" rotate={-1}>It just runs</Sticker>ts
<script setup lang="ts">import { Sticker } from "@grassroot/ui-vue";</script> <template> <Sticker tone="accent" :rotate="-3">What I build</Sticker> <Sticker tone="neutral" :rotate="2">Boring tech</Sticker> <Sticker tone="success" :rotate="-1">It just runs</Sticker></template>ts
import { Component } from "@angular/core";import { GrassrootSticker } from "@grassroot/ui-angular"; @Component({ selector: "app-example", standalone: true, imports: [GrassrootSticker], template: ` <grassroot-sticker tone="accent" [rotate]="-3">What I build</grassroot-sticker> <grassroot-sticker tone="neutral" [rotate]="2">Boring tech</grassroot-sticker> <grassroot-sticker tone="success" [rotate]="-1">It just runs</grassroot-sticker> `,})export class ExampleComponent {}ts
<script lang="ts"> import { Sticker } from "@grassroot/ui-svelte";</script> <Sticker tone="accent" rotate={-3}>What I build</Sticker><Sticker tone="neutral" rotate={2}>Boring tech</Sticker><Sticker tone="success" rotate={-1}>It just runs</Sticker>ts
import { Sticker } from "@grassroot/ui-solid"; export function Example() { return ( <> <Sticker tone="accent" rotate={-3}>What I build</Sticker> <Sticker tone="neutral" rotate={2}>Boring tech</Sticker> <Sticker tone="success" rotate={-1}>It just runs</Sticker> </> );}Installation
bash
pnpm dlx grassroot add ui/stickerbash
npx grassroot@latest add ui/stickerbash
yarn dlx grassroot add ui/stickerbash
bunx grassroot add ui/stickerAPI Reference
| Prop | Type | Default |
|---|---|---|
tone | "info" | "success" | "neutral" | "accent" | undefined | "accent" |
rotateDegrees of rotation for the tilt. | number | undefined | -2 |