Skip to content

Ribbon

Ribbons are decorative elements placed on the corner of cards or containers. They support left and top positions with text or icon content.

vue

<TCard>
  <TRibbon color="red">Hot</TRibbon>
  <!-- ... -->
</TCard>

Ribbon Position

Use the position prop to switch between start (left, default) and top.

vue

<TRibbon position="start" color="blue">Left</TRibbon>
<TRibbon position="top" color="purple">Top</TRibbon>

Ribbon Color

The color prop sets the background color, supporting all Tabler preset colors.

vue

<TRibbon color="red">Red</TRibbon>
<TRibbon color="blue">Blue</TRibbon>
<TRibbon color="green">Green</TRibbon>
<TRibbon color="orange">Orange</TRibbon>
<TRibbon color="purple">Purple</TRibbon>
<TRibbon color="cyan">Cyan</TRibbon>

Text & Icon Content

The default slot accepts text or @tabler/icons-vue icons.

vue

<TRibbon color="red">New</TRibbon>
<TRibbon color="green"><IconStar :size="24" /></TRibbon>
<TRibbon color="orange"><IconAlertTriangle :size="24" /></TRibbon>

Bookmark Style

Enable the bookmark prop for a bookmark-style ribbon (diagonal cut at the bottom corner).

vue

<TRibbon color="red" bookmark>Hot</TRibbon>
<TRibbon color="blue" position="top" bookmark><IconBell :size="24" /></TRibbon>

Usage with TCard

TRibbon works seamlessly with the TCard component. You can use the ribbonColor and ribbonPosition props on TCard directly.

vue

<TCard ribbonColor="red" title="Left Ribbon">
  <template #ribbon>Hot</template>
</TCard>

API

Props

PropDescriptionTypeDefault
positionRibbon position: left (start) / top'start' | 'top''start'
colorRibbon background color (Tabler preset)TablerColorundefined
bookmarkBookmark style (diagonal bottom cut)booleanfalse

Slots

SlotDescription
defaultRibbon content, accepts text and icons