2

Right now I have a long and wide table. It takes all of the 16 spots in the grid and looks good on desktop. But, when I view it on mobile it stretches the whole page. I don't seem to understand how to make it responsive so it will fit in a mobile view.

Anyone have experience with this and managed to do it?

2 Answers 2

3

you can use Responsive tag to make your page responsive for each tools. like this :

const App = () => (
  <Container>
    <Table>
      <Table.Body>
        <Table.Row>
          <Responsive as={Table.Cell} minWidth={Responsive.onlyMobile.minWidth}>
            Foo
          </Responsive>
          <Table.Cell>Bar</Table.Cell>
          <Responsive as={Table.Cell} minWidth={Responsive.onlyMobile.minWidth}>
            <Responsive
              as={Table.Cell}
              minWidth={Responsive.onlyMobile.minWidth}
            >
              Baz
            </Responsive>
          </Responsive>
        </Table.Row>
      </Table.Body>
    </Table>
  </Container>
);
0

Even before considering the technical aspects of this question, you need to think about the user experience you would like to achieve - which depends on the nature of the data you are presenting and how to present that data meaningfully to your users. In other words, there is a difficult design challenge to be solved before you look at the technical aspects of implementing that design.

Suppose your table was about economic data, with 20 different economic stats as column headings and 600 rows of monthly records, what would you like your user to see initially when they hit your site from a mobile device? Can you break the giant table into several smaller tables for viewing on a mobile?

Have a look at how other sites have solved the problem. One good example is the front page of https://tradingeconomics.com.

When viewed in full on my Macbook Pro, this page shows twelve columns of data (GPD, interest rate, ..., population), one for every country. As you narrow down the browser window (i.e. simulating a mobile device such as an iPad or an iPhone), individual columns drop off progressively - from 12 to 10 and then to 4. What happens to the columns that drop off? They appear in a separate table.

A further thing to notice is the obvious use of a "more" button to display the full set of rows (the list of countries), so that users on a mobile device are presented initially with a manageable number of rows.

Over the years I've seen various great sites and books (e.g. to do with datatables and UX) that discuss how others have solved the same sorts of issues that you have now, but I won't make any recommendations as the methods will depend upon your design needs.

Once you have a look at how other sites have solved the design problems, given their specific data, the technical question of how to achieve this (e.g. via Semantic UI CSS themes or other techniques) will be easier to define.

1
  • I agree. Well, the best design example I would like to have in my project is what coinmarketcap.com does. It highlights 1 column and let you scroll through the others on mobile. Because I understand the limitations of Semantic-UI-React, I mainly want to have something in the liking of what coingecko.com is doing. Anything else other than the tables is responsive and fits into the screen. Only the table requires sweeping motion. This is got for me as the data is not cramped. It stays in it's normal size and the users chooses what data to view.
    – Contentop
    Commented Jan 14, 2019 at 14:07

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.