Clay Banks
Clay Banks

Reputation: 4581

Hyperlink an Input Label in Semantic UI React

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?

Upvotes: 0

Views: 924

Answers (1)

MEnf
MEnf

Reputation: 1512

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} />

Upvotes: 1

Related Questions