Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wish there was more details about styling! #154

Open
ghost opened this issue May 23, 2019 · 4 comments
Open

Wish there was more details about styling! #154

ghost opened this issue May 23, 2019 · 4 comments

Comments

@ghost
Copy link

ghost commented May 23, 2019

I tried to change the style but the documentation was really complicated,

@PedroNunezCode
Copy link

@Omid-Incarnation Hey, did you succeed?

@ghost
Copy link
Author

ghost commented May 28, 2019 via email

@arhoy
Copy link

arhoy commented Dec 7, 2019

Can anyone here tell me how to style the value of the input range. I need to make the font bigger and give it some padding/margin

@nodes777
Copy link

For others who find themselves with this issue; there is a prop classNames that lets you overwrite the default CSS classes:

Replace the default classnames with the styles you want. We're using css modules below:

<InputRange
	classNames={{
		activeTrack: styles.inputRangeTrackActive,
		disabledInputRange: styles.inputRangeDisabled,
		inputRange: styles.inputRange,
		labelContainer: styles.labelContainer,
		maxLabel: styles.labelMax,
		minLabel: styles.labelMin,
		slider: styles.inputRangeSlider,
		sliderContainer: styles.sliderContainer
		track: styles.track,
		valueLabel: styles.valueLabel,
	}}
	formatLabel={value => ``}
	minValue={min}
	maxValue={max}
	value={this.state.value}
	onChange={value => this.setState({ value })}
/>

If you need to apply multiple styles as modules I use the classNames module. Not to be confused with the prop ^^ of the same name

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants