Comments (2)
you can use the parent's data attribute to style the child via css only. as I usually use tailwind I would use the group modifier
from primitives.
You can't "read" the internal state of the components, but you can create your own controlled components and use that state as the source of truth. In the case of radio group items, you'd also need to pass down the current value from root to the items via React context.
For example, see the Segmented Control component in Radix Themes which is built on top of the Toggle Group primitive. Instead of "reading" the primitive state, it bases its state on the value props and passes them down to the primitive.
from primitives.
Related Issues (20)
- Any way of preventing input or text selection from changing after the pointer leaves Popover.Content
- Radio Button not accessible in high contrast mode HOT 1
- Tooltip + DropdownMenu.Item when hovering tooltip disappears
- How to make the step dynamic for non linear values?
- Component Testing: Error: `DialogClose` must be used within `Dialog` HOT 2
- DialogPortal `forceMount` property only accepts type issue
- Incorrect behaviour when `forceMount` used inside a parent `<DismissibleLayer>` component
- HTML Attributes on `Portal` are not being rendered to the DOM
- Define translateX on `NavigationBar.Indicator` as a custom CSS property
- Dialog content points to a non-existent `aria-describedby` id even when Dialog description is not present
- Windows horizontal scroll with shift + mouse track wheel broken when `Popover.Root` has `modal` prop
- Slider onValueChange is not called repeatedly when dragging on Android
- Should onPointerDown event on DropdownMenuTrigger replaced with onClick handler?
- Menu trigger's aria-controls creates invalid html
- context menu radio group disable
- Passing non-standard HTML as a child prop to Trigger breaks Context Menu (Themes and primitive)
- direction is not added in the html tag
- Searchable Select Component
- tooltip closes after clicking on content
- Overlay in Dropdown menu HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primitives.