0

I have the following <Form.Input> that has a label I'd like users to be able to click, taking them to a new site in a new tab

<Form.Input 
    label='Icon (See Semantic Icons for options)' 
    name='icon' value={icon || ''} 
    onChange={this.handleChange} />

I don't see any documentation on how to achieve this - is it possible to embed a hyperlink within an attribute in Semantic UI React?

1 Answer 1

1

You can pass an element to the label prop, so you can do something like this

<Form.Input 
label={<div>Icon (<a href="www.semantic-options.com">See Semantic Icons for options</a>)</div>} 
name='icon' value={icon || ''} 
onChange={this.handleChange} />
Sign up to request clarification or add additional context in comments.

1 Comment

Brilliant m8. Thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.