Skip to content
Discussion options

You must be logged in to vote

The easiest way is to center it using text alignment via Pass Through:

<Card
  title="My Title"
  pt={{
    title: { className: 'text-center' }
  }}
>

If you want more control (icons, custom layout, etc.), you can also pass a custom title:

<Card
  title={
    <div className="flex justify-content-center align-items-center">
      My Title
    </div>
  }
>

The first approach is usually enough if you just want centered text

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@chrishj59
Comment options

Answer selected by chrishj59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Workaround Workaround for the issue is found
2 participants