Skip to main content

Checkbox

Checkbox provides users to select either multiple items from a list or to mark one individual item as selected.

installversionusagestyle
yarn add @ciceksepeti/cui-checkbox1.0.0import {Checkbox} from '@ciceksepeti/cui-checkbox'import '@ciceksepeti/cui-checkbox/style.css'

Content​

Tri-state checkbox components allow a user to input true/false/indeterminate states.

Examples​

Example of a default behavior of 'Checkbox' component.

Default​

import React, { useState } from 'react';
import { Checkbox } from '@ciceksepeti/cui-checkbox';
import '@ciceksepeti/cui-checkbox/styles.css';

const Example = () => {
const [checked, setChecked] = useState(false);

return (
<div style={{ display: 'flex', alignItems: 'center' }}>
<Checkbox
id="rose"
name="rose"
value="rose"
disabled={false}
checked={checked}
indeterminate={false}
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
setChecked(event.target.checked)
}
/>
<label htmlFor="rose">rose</label>
</div>
);
};
PREVIEW
Checkbox

Checkbox Types​

PREVIEW
Checkbox

Props​

Checkbox Props​

Checkbox Keyboard Actions​

Playground​

/img/codesandbox-icon

Styling​

Element Selectors​

Default Selectors Values​