Start sharing components as a team!Share components as a team!Join Bit to build your applications faster.Get Started Free

responsive

v0.86.0arrow_drop_down
v0.86.0
v0.85.0
v0.84.0
STATUS
Passing
DOWNLOADS
291
LICENSE
MIT
VISIBILITY
Public
PUBLISHED
7 months ago
SIZE
71 KB
Called to get width of screen.
1 contributor
Use responsive in your project ?
Copied
npm i @bit/semantic-org.semantic-ui-react.responsive
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.dev
Component Example
React
React
Vue
Angular
Add dependency... help_outline
Just
import
any of the 1 million components
and packages in Bit or NPM to the example.
import Button from '@bit/grommet.grommet.button';
import Lodash from 'lodash';
revert changes
reload
toggle layout
maximize
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
modifieddraft
chevron_left
chevron_right

Called to get width of screen. Defaults to using window.innerWidth when in a browser; otherwise, assumes a width of 0.

Called on update.

Responsive ()

Responsive can control visibility of content.

Properties
NameTypeDefault valueDescription
as
custom

An element type to render as (string or function).

children
node

Primary content.

fireOnMount
bool

Fires callbacks immediately after mount.

getWidth
function() => (isBrowser() ? window.innerWidth : 0)

Called to get width of screen. Defaults to using window.innerWidth when in a browser; otherwise, assumes a width of 0.

maxWidth
number | string

The maximum width at which content will be displayed.

minWidth
number | string

The minimum width at which content will be displayed.

onUpdate
function

The React SyntheticEvent object