A block variation instead of a second block

A “featured” version of an existing block, which had been built as a separate block with a duplicated edit component.

registerBlockVariation( 'turkerdev/card', {
  name: 'featured-card',
  title: 'Featured card',
  attributes: { tone: 'featured', showImage: true },
  isActive: (blockAttributes) => blockAttributes.tone === 'featured',
  scope: ['inserter', 'transform'],
})

A variation is the same block with different starting attributes, which is what “a featured version” means and covers most cases that get built as a second block. isActive is what makes the editor show the variation’s name rather than the base block’s, and omitting it produces a variation that inserts correctly and is unrecognisable afterwards — the most common mistake with this API.