Rost
← All components
component

Thumbs

A project thumbnail card, with the project name and details on a frosted panel at the bottom.

In codeContract: reviewGuidance: agreedContract on GitHubFigma 109:79

Hover, press or tab to one to see the other 3 states.

When to use

  • Used as a card for one project or item in a grid or a carousel. The whole card links to the details.
  • A list of things that each want a picture and a short line of facts under a name.

When not to use

  • A card that isn't a link. Thumbs has hover, pressed and focus because it's meant to be clicked.
  • Long names. The title doesn't wrap, by design. Two or three words.

Behaviour

The picture fills the card, and the frosted panel sits on its bottom edge with the number, the name and three details. On hover and pressed the name and number go green, and the details lighten. Disabled dims the picture and the panel and shows the badge ("Coming soon"). Locked keeps the card as it is and puts a green lock in the corner, for work I can't show without a password.

Accessibility

  • Element: an <a>. Disabled drops the href and sets aria-disabled="true".
  • Name: the link's text, which is the number, the name and the details read in order. Pass aria-label if that reads badly.
  • Keyboard: Tab to it, Enter opens it.
  • Focus: a 2px ring, 2px outside the card, on :focus-visible only.
  • Colour: Locked says it with the lock icon, which has its own text ("Locked") for screen readers.

Content

The name is the client or the product, as people know it. Details are a word or two each, the period like "2024" or "2023 to 2025".

Props

PropTypeValuesDefault
nameslot
numberslot
industryslot
typeslot
periodslot
showNumberbooleantrue
showNamebooleantrue
showIndustrybooleantrue
showTypebooleantrue
showPeriodbooleantrue
imageslot
badgeslot

States: Default, Hover, Pressed, Focus, Disabled, Locked.

Where it's used

Values

Straight from the contract. Each value sits next to its token, because six tokens here all come out as #3a3a3a and the colour alone can't tell you which one is right.

Never changes

PartPropertyValueToken
rootdisplayflexlayout
rootflex-directioncolumnlayout
rootalign-itemsflex-startlayout
rootpositionrelativelayout
rootgap0pxspacing/gap/none
rootborder-radius24pxspacing/radius/xlarge
roottext-decorationnoneFigma frame size
rootcolorinheritFigma frame size
rootoutlinenoneFigma frame size
rootheight334pxFigma frame size
rootwidth384pxFigma frame size
slotflex1 0 0layout
slotmin-height1pxFigma frame size
slotwidth100%layout
slotpositionrelativelayout
slotoverflowhiddenlayout
slotbackground#171717non-interactive/background/secondary
slotborder-radius24pxspacing/radius/xlarge
shadowpositionabsolutelayout
shadowleft0no token yet
shadowright0no token yet
shadowbottom0no token yet
shadowheight50%no token yet
shadowbackgroundlinear-gradient(to bottom, rgba(6,8,5,0), var(--non-interactive-background-primary))on purpose: A gradient from the page background, transparent, to the page background. The colour is the token; the ramp is the effect.
shadowopacity0.48opacity/medium
shadowborder-bottom-left-radius24pxspacing/radius/xlarge
shadowborder-bottom-right-radius24pxspacing/radius/xlarge
shadowpointer-eventsnoneFigma frame size
contentpositionabsolutelayout
contentleft8pxspacing/gap/small
contentright8pxspacing/gap/small
contentbottom8pxspacing/gap/small
contentdisplayflexlayout
contentflex-directioncolumnlayout
contentalign-itemsflex-startlayout
contentbackgroundcolor-mix(in srgb, var(--base-black) calc(var(--opacity-medium) * 100%), transparent)on purpose: Composed from tokens: base/black at opacity/medium.
contentbackdrop-filterblur(12px)effect/thumb
contentgap8pxspacing/gap/small
contentpadding-bottom24pxspacing/gap/large
contentpadding-top16pxspacing/gap/medium
contentpadding-left16pxspacing/gap/medium
contentpadding-right16pxspacing/gap/medium
contentborder-radius16pxspacing/radius/large
titlealign-itemscenterlayout
titledisplayflexlayout
titleflex-shrink0layout
titlewidth100%layout
titlepositionrelativelayout
titlegap16pxspacing/gap/medium
numberjustify-contentcenterlayout
numberalign-itemscenterlayout
numberdisplayflexlayout
numberflex-shrink0layout
numberpositionrelativelayout
numberwidth16pxspacing/size/2xsmall
numberfont-family'General Sans Variable'font-family/base
numberfont-weight400typography/label/font-weight/regular
numberline-height14pxtypography/label/line-height
numberfont-size12pxtypography/label/font-size
numberletter-spacing0pxtypography/label/letter-spacing
textflex-shrink0layout
textwhite-spacenowraplayout
textpositionrelativelayout
textfont-family'General Sans Variable'font-family/base
textfont-weight500typography/title/font-weight/medium
textline-height32pxtypography/title/line-height
textfont-size24pxtypography/title/font-size
textletter-spacing0pxtypography/title/letter-spacing
bottomalign-itemscenterlayout
bottomdisplayflexlayout
bottomflex-shrink0layout
bottomjustify-contentflex-endlayout
bottompositionrelativelayout
bottomgap16pxspacing/gap/medium
bottompadding-left32pxspacing/gap/xlarge
detailflex-shrink0layout
detailwhite-spacenowraplayout
detailpositionrelativelayout
detailfont-family'General Sans Variable'font-family/base
detailfont-weight400typography/label/font-weight/regular
detailline-height14pxtypography/label/line-height
detailfont-size12pxtypography/label/font-size
detailletter-spacing0pxtypography/label/letter-spacing
icons-dotdisplayflexlayout
icons-dotalign-itemscenterlayout
icons-dotjustify-contentcenterlayout
icons-dotflex-shrink0layout
icons-dotpositionrelativelayout
icons-dotwidth12pxspacing/size/3xsmall
icons-dotheight12pxspacing/size/3xsmall
dotwidth3pxon purpose: The dot's own size inside the icon.
dotheight3pxon purpose: The dot's own size inside the icon.
dotborder-radius10000pxspacing/radius/full
focus-ringdisplaynonelayout
focus-ringpositionabsolutelayout
focus-ringinsetcalc(-1 * var(--spacing-gap-2xsmall))layout
focus-ringborder-stylesolidno token yet
focus-ringborder-width2pxspacing/outline/medium
focus-ringborder-color#999project/focus/focus-ring
focus-ringborder-radiuscalc(var(--spacing-radius-xlarge) + var(--spacing-gap-2xsmall))on purpose: Composed from tokens: the element's spacing/radius/xlarge plus the ring's spacing/gap/2xsmall.
focus-ringpointer-eventsnoneFigma frame size
badgepositionabsolutelayout
badgetop16pxspacing/gap/medium
badgeright16pxspacing/gap/medium
badgedisplayflexlayout
lockedpositionabsolutelayout
lockedtop16pxspacing/gap/medium
lockedright16pxspacing/gap/medium
lockedalign-itemscenterlayout
lockeddisplayflexlayout
lockedbackground#00d669non-interactive/background/positive/base
lockedgap0pxspacing/gap/none
lockedpadding8pxspacing/gap/small
lockedborder-radius12pxspacing/radius/medium
icons-lockdisplayblocklayout
icons-lockflex-shrink0layout
icons-lockpositionrelativelayout
icons-lockwidth24pxspacing/size/small
icons-lockheight24pxspacing/size/small
icons-lockbackground#060805non-interactive/foreground/contrast
icons-lockmaskurl(./icon-lock.svg) center / contain no-repeaton purpose: The icon file itself.

Changes by variant

content.opacity1
state=Disabled0.32opacity/mild
detail.color6
state=Default#999project/default/sub-label
state=Hover#edededproject/hover/sub-label
state=Pressed#c2c7c3project/pressed/sub-label
state=Focus#999project/focus/sub-label
state=Disabled#999project/disabled/sub-label
state=Locked#999project/default/sub-label
dot.background5
state=Default#747573project/default/icon
state=Hover#edededproject/hover/icon
state=Pressed#c2c7c3project/pressed/icon
state=Focus#747573project/focus/icon
state=Disabled#747573project/disabled/icon
focus-ring.display1
state=Focusblocklayout
number.color6
state=Default#999project/default/sub-label
state=Hover#00d669project/hover/label
state=Pressed#00d669project/pressed/label
state=Focus#999project/focus/sub-label
state=Disabled#999project/disabled/sub-label
state=Locked#999project/default/sub-label
root.cursor1
state=DisableddefaultFigma frame size
slot.opacity1
state=Disabled0.32opacity/mild
text.color6
state=Default#d3d9d5project/default/label
state=Hover#00d669project/hover/label
state=Pressed#00d669project/pressed/label
state=Focus#d3d9d5project/focus/label
state=Disabled#d3d9d5project/disabled/label
state=Locked#d3d9d5project/default/label