Rost
← All components
component

Testimonials

A testimonial you can open and close: name and role, with the quote underneath.

In codeContract: reviewGuidance: agreedContract on GitHubFigma 144:67
Default · not expanded

This is where the testimonial goes

Default · expanded
Disabled · not expanded

This is where the testimonial goes

Disabled · expanded

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

When to use

  • Used as a testimonial box or a list of quotes: name and role first, and each one opens to show the quote.

When not to use

  • A quote that should always be visible. Put it on the page as text.
  • More than a sentence or three. It's a quote, not an article.

Behaviour

Closed, it's a row: the picture, the name and the role, a chevron, and a line underneath. Press it and it opens: the header slides 16px right and the quote shows below in typography/sub-title. On hover and press the name goes green and the line turns green (2px on hover). Disabled fades it to opacity/gentle.

Accessibility

  • Element: a <div> holding a <button aria-expanded> (the header) and the quote, which the button controls with aria-controls.
  • Name: the name and the role, from the button's text.
  • Keyboard: Tab to the header, Enter or Space opens and closes it.
  • Focus: a 2px ring, 4px outside the whole block, while the header has :focus-visible.

Content

The name as the person writes it. The role in a few words. The quote in their words, trimmed, never rewritten.

Props

PropTypeValuesDefault
nameslot
jobDescriptionslot
testimonialslot
pictureslot
expandedbooleanfalse
showNamebooleantrue
showJobDescriptionbooleantrue
showActionbooleantrue
showDividerbooleantrue

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

Where it's used

Where code differs on purpose

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
rootalign-itemscenterlayout
rootpositionrelativelayout
rootgap40pxspacing/gap/2xlarge
rootpadding-top24pxspacing/gap/large
rootpadding-bottom24pxspacing/gap/large
rootpadding-left0pxspacing/gap/none
rootpadding-right0pxspacing/gap/none
rootwidth976pxFigma frame size
outlinepositionabsolutelayout
outlineleft0no token yet
outlineright0no token yet
outlinebottom0no token yet
outlinepointer-eventsnoneFigma frame size
topdisplayflexlayout
topalign-itemscenterlayout
topflex1 0 0layout
topwidth100%layout
topgap24pxspacing/gap/large
toppadding0pxspacing/gap/none
topbackgroundnoneFigma frame size
topbordernoneFigma frame size
topfontinheritFigma frame size
topcolorinheritFigma frame size
toptext-alignleftlayout
topcursorpointerFigma frame size
topoutlinenoneFigma frame size
leftdisplayflexlayout
leftalign-itemscenterlayout
leftflex1 0 0layout
leftmin-width1pxFigma frame size
leftgap24pxspacing/gap/large
slotflex-shrink0layout
slotpositionrelativelayout
slotoverflowhiddenlayout
slotwidth56pxspacing/size/large
slotheight56pxspacing/size/large
slotborder-radius10000pxspacing/radius/full
contentdisplayflexlayout
contentflex-directioncolumnlayout
contentalign-itemsflex-startlayout
contentjustify-contentcenterlayout
contentgap4pxspacing/gap/2xsmall
contentwhite-spacenowraplayout
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
job-descriptionfont-family'General Sans Variable'font-family/base
job-descriptionfont-weight400typography/paragraph/font-weight/regular
job-descriptionline-height20pxtypography/paragraph/line-height
job-descriptionfont-size14pxtypography/paragraph/font-size
job-descriptionletter-spacing0pxtypography/paragraph/letter-spacing
actionsdisplayflexlayout
actionsalign-itemscenterlayout
actionsjustify-contentcenterlayout
actionsflex-shrink0layout
actionswidth32pxspacing/size/small-medium
actionsheight32pxspacing/size/small-medium
actionsborder-radius10000pxspacing/radius/full
icons-chevrondisplayblocklayout
icons-chevronwidth16pxspacing/size/2xsmall
icons-chevronheight16pxspacing/size/2xsmall
icons-chevronbackground#00d669actions/borderless/default/icon
icons-chevronmaskurl(./icon-chevron-down.svg) center / contain no-repeaton purpose: The icon file itself.
bottomdisplaynonelayout
bottomwidth100%layout
testimonialflex1 0 0layout
testimonialmin-width1pxFigma frame size
testimonialcolor#d3d9d5non-interactive/foreground/secondary
testimonialfont-family'General Sans Variable'font-family/base
testimonialfont-weight400typography/sub-title/font-weight/regular
testimonialline-height28pxtypography/sub-title/line-height
testimonialfont-size20pxtypography/sub-title/font-size
testimonialletter-spacing0pxtypography/sub-title/letter-spacing
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-ringpointer-eventsnoneFigma frame size

Changes by variant

bottom.display5
state=Default, expanded=Trueflexlayout
state=Hover, expanded=Trueflexlayout
state=Pressed, expanded=Trueflexlayout
state=Focus, expanded=Trueflexlayout
state=Disabled, expanded=Trueflexlayout
focus-ring.display2
state=Focus, expanded=Falseblocklayout
state=Focus, expanded=Trueblocklayout
icons-chevron.mask5
state=Default, expanded=Trueurl(./icon-chevron-up.svg) center / contain no-repeaton purpose: The icon file itself.
state=Hover, expanded=Trueurl(./icon-chevron-up.svg) center / contain no-repeaton purpose: The icon file itself.
state=Pressed, expanded=Trueurl(./icon-chevron-up.svg) center / contain no-repeaton purpose: The icon file itself.
state=Focus, expanded=Trueurl(./icon-chevron-up.svg) center / contain no-repeaton purpose: The icon file itself.
state=Disabled, expanded=Trueurl(./icon-chevron-up.svg) center / contain no-repeaton purpose: The icon file itself.
job-description.color10
state=Default, expanded=False#999project/default/sub-label
state=Default, expanded=True#999project/default/sub-label
state=Hover, expanded=False#edededproject/hover/sub-label
state=Hover, expanded=True#edededproject/hover/sub-label
state=Pressed, expanded=False#c2c7c3project/pressed/sub-label
state=Pressed, expanded=True#c2c7c3project/pressed/sub-label
state=Focus, expanded=False#999project/focus/sub-label
state=Focus, expanded=True#999project/focus/sub-label
state=Disabled, expanded=False#999project/disabled/sub-label
state=Disabled, expanded=True#999project/disabled/sub-label
outline.background10
state=Default, expanded=False#3a3a3aproject/default/outline
state=Default, expanded=True#3a3a3aproject/default/outline
state=Hover, expanded=False#00d669project/hover/outline
state=Hover, expanded=True#00d669project/hover/outline
state=Pressed, expanded=False#10ffa4project/pressed/outline
state=Pressed, expanded=True#10ffa4project/pressed/outline
state=Focus, expanded=False#3a3a3aproject/focus/outline
state=Focus, expanded=True#3a3a3aproject/focus/outline
state=Disabled, expanded=False#3a3a3aproject/disabled/outline
state=Disabled, expanded=True#3a3a3aproject/disabled/outline
outline.height10
state=Default, expanded=False1pxspacing/outline/small
state=Default, expanded=True1pxspacing/outline/small
state=Hover, expanded=False2pxspacing/outline/medium
state=Hover, expanded=True2pxspacing/outline/medium
state=Pressed, expanded=False1pxspacing/outline/small
state=Pressed, expanded=True1pxspacing/outline/small
state=Focus, expanded=False1pxspacing/outline/small
state=Focus, expanded=True1pxspacing/outline/small
state=Disabled, expanded=False1pxspacing/outline/small
state=Disabled, expanded=True1pxspacing/outline/small
root.align-items5
state=Default, expanded=Trueflex-startlayout
state=Hover, expanded=Trueflex-startlayout
state=Pressed, expanded=Trueflex-startlayout
state=Focus, expanded=Trueflex-startlayout
state=Disabled, expanded=Trueflex-startlayout
root.flex-direction5
state=Default, expanded=Truecolumnlayout
state=Hover, expanded=Truecolumnlayout
state=Pressed, expanded=Truecolumnlayout
state=Focus, expanded=Truecolumnlayout
state=Disabled, expanded=Truecolumnlayout
root.justify-content5
state=Default, expanded=Truecenterlayout
state=Hover, expanded=Truecenterlayout
state=Pressed, expanded=Truecenterlayout
state=Focus, expanded=Truecenterlayout
state=Disabled, expanded=Truecenterlayout
root.opacity2
state=Disabled, expanded=False0.24opacity/gentle
state=Disabled, expanded=True0.24opacity/gentle
root.padding-left7
state=Default, expanded=True16pxspacing/gap/medium
state=Hover, expanded=False16pxspacing/gap/medium
state=Hover, expanded=True16pxspacing/gap/medium
state=Pressed, expanded=False16pxspacing/gap/medium
state=Pressed, expanded=True16pxspacing/gap/medium
state=Focus, expanded=True16pxspacing/gap/medium
state=Disabled, expanded=True16pxspacing/gap/medium
text.color10
state=Default, expanded=False#d3d9d5project/default/label
state=Default, expanded=True#d3d9d5project/default/label
state=Hover, expanded=False#00d669project/hover/label
state=Hover, expanded=True#00d669project/hover/label
state=Pressed, expanded=False#00d669project/pressed/label
state=Pressed, expanded=True#00d669project/pressed/label
state=Focus, expanded=False#d3d9d5project/focus/label
state=Focus, expanded=True#d3d9d5project/focus/label
state=Disabled, expanded=False#d3d9d5project/disabled/label
state=Disabled, expanded=True#d3d9d5project/disabled/label
top.cursor2
state=Disabled, expanded=FalsedefaultFigma frame size
state=Disabled, expanded=TruedefaultFigma frame size