Dither Badge
buttonNyProEt pilleformet mærke med tekst og ikon, trykt som Bayer-dithret pixelgrafik i tre farver på en gradient. Prikkerne glimter, og ikonet vugger. Kan bruges som mærke, knap eller link.
Introduktionspris til og med 31. december 2026. Derefter 79 €.
Preview
Live demo. Temaet skifter selve demoen.
Kode
Koden er låst
Dither Badge er en del af Manniche UI Pro. En nøgle åbner kildekoden til alle 66 effekter.
Køb · 49 €49 € · Introduktionspris til og med 31. december 2026. Derefter 79 €.
- Engangsbetaling
- Én udvikler
- Log ind og opret din nøgle med det samme
- Ingen moms (§ 19 UStG)
Har du en nøgle? Hent koden med CLI eller MCP.
Nøglen ligger i MANNICHE_PRO_KEY, aldrig i koden eller i adressen. Sådan sætter du den op
npx shadcn@latest add @manniche-pro/dither-badgeclaude mcp add --transport http manniche-ui https://mikkelmanniche.dk/api/mcp --header "Authorization: Bearer $MANNICHE_PRO_KEY"Props
DitherBadgeProps
| Prop | Type | Standard | Hvad den gør |
|---|---|---|---|
children | ReactNode | – | The label. It is real text, drawn crisp over the dither. |
icon | ReactNode | – | A line icon (an SVG element, e.g. from lucide-react). It is printed in dots and sways a little. |
as | 'span' | 'button' | 'a' | 'span' | span for a static badge, button for an action, a for a link (pass href). |
href | string | – | Link target when as="a". |
type | 'button' | 'submit' | 'reset' | 'button' | Button type when as="button". |
disabled | boolean | – | Disables the button (only with as="button"). |
tone | DitherBadgeTone | 'bubblegum' | A ready-made pair of pill and icon inks. |
inks | DitherBadgeInks | – | Your own pill inks, shadow to highlight. |
iconInks | DitherBadgeInks | – | Your own icon inks, shadow to highlight. |
labelColor | string | – | Colour of the label. |
size | DitherBadgeSize | 'md' | Height step: 32, 44 or 56 pixels. |
iconSide | 'start' | 'end' | 'end' | Side the icon sits on. |
dot | number | 2 | Size of one printed dot in CSS pixels. |
shimmer | boolean | true | Let the dots shimmer and a gloss band pass over the pill now and then. |
sway | boolean | true | Let the icon sway. |
iconFill | boolean | false | Fill the icon's shapes as well as its lines. Suits solid icons; line icons usually look best unfilled. |
className | string | – | Classes for the pill. |
style | CSSProperties | – | Inline style for the pill. |
Tager også alle props fra Omit<HTMLAttributes<HTMLElement>, 'children'>.
A11y
Tastatur
With as="button" or as="a" it is a native button or link with a visible focus ring. Hover and focus speed up the sway. Space applies only to as="button".
Skærmlæser
The label is real text. The dithered canvases and the source icon are aria-hidden. If the label alone is not clear, for example a bare count, pass aria-label, as the demo’s like button does.
Mindre bevægelse
Under reduced motion the dither and the icon stand still. The shimmer runs at about 15 fps and stops off screen.
Andet
Label colour is set per tone for contrast. If you change inks, set labelColor to match.