(null);
{
@value = e.value;
}}
>
for (const framework of frameworks; key framework) {
{framework}
}
}
```
### Root Provider
An alternative way to control the segment group is to use the `RootProvider` component and the `useSegmentGroup` hook.
This way you can access the state and methods from outside the component.
**Example: root-provider**
```ripple
import { SegmentGroup, useSegmentGroup } from 'ark-ripple/segment-group';
import styles from 'styles/segment-group.module.css';
const frameworks = ['React', 'Solid', 'Vue'];
export component RootProvider() {
const segmentGroup = useSegmentGroup({ defaultValue: 'React' });
for (const framework of frameworks; key framework) {
{framework}
}
}
```
### Disabled
To disable a segment, simply pass the `disabled` prop to the `SegmentGroup.Item` component:
**Example: disabled**
```ripple
import { SegmentGroup } from 'ark-ripple/segment-group';
import styles from 'styles/segment-group.module.css';
const frameworks = ['React', 'Solid', 'Vue'];
export component Disabled() {
for (const framework of frameworks; key framework) {
{framework}
}
}
```
## API Reference
## Accessibility
Complies with the [Radio WAI-ARIA design pattern](https://www.w3.org/WAI/ARIA/apg/patterns/radio/).
### Keyboard Support