Suppress `col` className in `Col` component
See original GitHub issueIssue description
- components:
Col
- reactstrap version
#5.0.0-alpha.4
- bootstrap version
#4.0.0-beta.2
What is happening?
Sometimes it’s not desirable to have a column element having the class col
. For example, one might want to reproduce the Stacked to horizontal example from Bootstrap’s documentation.
In my specific case, I wan my columns to have only the class col-md-4
. If I use <Col md='4'>My content</Col>
the resulting HTML element will have the class col col-md-4
. By looking into Col
’s source code, I found out that I can get rid of the col
class by setting xs={false} md='4'
, but I believe that’s not the correct way of doing it (right?).
I think it would be nice to have an “intended” way of suppressing the col
class name.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
How to hide Columns on a layout screen size on react ...
I tried: <Col xs="0"></Col> and similar but that did not work. Does anyone know how to hide a react-bootstrap Column? react-bootstrap.
Read more >React-Bootstrap Container, Row and Col Component
It is used when we want to display data in the form of rows. Col Component provides a way to represent a column...
Read more >CSS · Bootstrap
Using a single set of .col-md-* grid classes, you can create a basic grid system that starts out stacked on mobile devices and...
Read more >Form Control - React-Bootstrap
Change the underlying component CSS base class name and modifier class names prefix. This is an escape hatch for working with heavily customized...
Read more >Grid Column Start / End - Tailwind CSS
Use the col-span-{n} utilities to make an element span n columns. 01. 02. 03. 04. 05. 06. 07.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Yes, that’s what I would expect from
Col
.<Col md={6}>
should create<div class="col-md-6">
<Col md={6} xs>
should create<div class="col col-md-6">
<Col>
should create<div class="col">
Does it makes sense for everybody?
col
is in bootstrap’s documentation and features things like<div class="col col-lg-2">
(showingcol
in conjuction with a col-breakpoint value) I’m fine with making this change if everyone thinks it is the right thing to do. Breaking changes don’t matter, we have semvar.