2

I have a component that uses Semantic UI Tab with only two (2) menu options. My problem is, how to wrap the 2 options to take advantage of the full width of its container.

Kindly see picture below for reference:

enter image description here

I want "Calendar" and "To-Do List" use 50% each of the width.

I use the code in their sample as below:

      const panes = [{
                menuItem: 'Calendar',
                render: () => <Tab.Pane attached={false}><EventList /></Tab.Pane>
              },
              {
                menuItem: 'To-Do List',
                render: () => <Tab.Pane attached={false}>Tab 2 Content</Tab.Pane>
              }
            ]
      return <Tab
          menu={{ attached: false }}
          panes={panes}
        />

2 Answers 2

1

You have to specify the number of panes in menu widths.

<Tab menu={{ widths: panes.length}} />
Sign up to request clarification or add additional context in comments.

Comments

0

I think the width of a tab is depends on content of each tab So I use 'Step' instead. Use this as Tab menu cuz it easier to make it equal. https://react.semantic-ui.com/elements/step/

enter image description here

Comments

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.