Skip to content
bref / ui

Svelte components, simply.

Star

Pill

A compact glass label for status, categories and optional actions.

Usage

Draft
Ready
Featured
Svelte
<script>
	import { Pill } from 'bref-ui';
</script>

<Pill label="Ready" color="success" variant="soft" />

Playground

Live preview

Status
Clicks: 0; removals: 0

Settings

Appearance
Content
Interaction
View generated code
Svelte
<script>
	import { Pill } from 'bref-ui';
</script>

<Pill
	label={'Status'}
	size="medium"
	variant="neutral"
	color="foreground"
	wide={false}
	glass={false}
	swoosh={false}
	icon={{ name: 'star', filled: false }}
	title="Native title attribute"
/>

Sizes, colors and variants

Interactions and snippets

Clickable
Removable
Combined
Animated
Content snippet

Clicks: 0; removals: 0

Full-width Pill

neutral

primary
secondary
foreground
muted
info
success
warning
error

soft

primary
secondary
foreground
muted
info
success
warning
error

filled

primary
secondary
foreground
muted
info
success
warning
error

Sizes and long content

x-small
x-small
small
small
medium
medium
large
large
x-large
x-large
A long category label that wraps on a narrow screen without losing its meaning

Glass over a patterned background

Compare glass and regular Pills over a swirling, striped background.

neutral
Without glass
Glass
Removable
soft
Without glass
Glass
Removable
filled
Without glass
Glass
Removable
Svelte
<Pill label="Glass" color="primary" glass />

Props and native behavior

Pill props
PropTypeRequiredDefaultDescription
labelstringYes—Visible label.
iconOmit<IconProps, 'label' | 'size' | 'color'>NoOmittedDecorative leading icon.
childrenSnippetNoOmittedVisible content.
sizeSizeNomediumFive sizes from x-small to x-large.
variantVariantNoneutralneutral, soft or filled.
colorExclude<Color, 'background'>NoforegroundTheme role.
onClick(event: MouseEvent) => voidNoOmittedActivate the Pill.
onDelete() => voidNoOmittedShow a labeled remove button.
widebooleanNofalseFill the available width.
swooshbooleanNofalseAnimate the highlight.
glassbooleanNofalseTranslucent paint and backdrop blur.

Pill accepts native div attributes and a children snippet. A clickable Pill supports Enter and Space; its remove button has a separate accessible name.