KeepLearning
KeepLearning

Reputation: 377

Ant Design, how to customize Steps component

I am using the Ant Design Steps component. I want to append additional components such as a button next to each step's description (make it more actionable).

I also want to make a border around each step's description.

Does anyone know how to use it?

Upvotes: 1

Views: 5546

Answers (1)

keikai
keikai

Reputation: 15146

Method

If you check their document, you would find that there are 4 APIs with type string|ReactNode

  • title
  • subTitle
  • icon
  • description

This means you can pass a child component to those props, which can be used for customizing.

Refer:


Demo

<Step
  title="Step 1"
  subTitle={<button>XXX</button>}
  status="finish"
  icon={<AcUnit />}
  description="This is a description."
/>

enter image description here

Edit Navigation Steps - Ant Design Demo

Upvotes: 3

Related Questions